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