| MATLAB Application Program Interface | Search  Help Desk |
| mxGetPr | Examples See Also |
Get an mxArray's real data elements
C Syntax
#include "matrix.h" double *mxGetPr(const mxArray *array_ptr);
Arguments
array_ptrmxArray.
Returns
The address of the first element of the real data. ReturnsNULL if there is no real data.
Description
CallmxGetPr to determine the starting address of the real data in the mxArray that array_ptr points to. Once you have the starting address, it is fairly easy to access any other element in the mxArray.
Examples
Seeconvec.c, doubleelement.c, findnz.c, fulltosparse.c, sincall.c, timestwo.c, timestwoalt.c, and xtimesy.c in the refbook subdirectory of the examples directory.
See Also
mxGetPi, mxSetPi, mxSetPr