MATLAB Application Program Interface Reference Help Desk

mxGetPr

Purpose

Get an mxArray's real data elements

Fortran Syntax

Arguments

pm

Pointer to an mxArray.

Returns

The address of the first element of the real data. Returns 0 if there is no real data.

Description

Call mxGetPr to determine the starting address of the real data in the mxArray that pm points to. Once you have the starting address, it is fairly easy to access any other element in the mxArray.

If you use mxGetPr or mxGetPi, note that mxFreeMatrix frees pr and pi using mxFree, so pr and pi should only be set to memory allocated with mxCalloc.

See Also

mxGetPi, mxSetPi, mxSetPr



[ Previous | Help Desk | Next ]