MATLAB Application Program Interface | Search  Help Desk |
mxGetPr | See Also |
Get an mxArray's
real data elements
integer*4 function mxGetPr(pm) integer*4 pmpm
mxArray
.
The address of the first element of the real data. Returns 0 if there is no real data.
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
.
mxGetPi
, mxSetPi
, mxSetPr