mxGetPr (C and Fortran) - Get real data elements in mxArray
C Syntax
#include "matrix.h"
double *mxGetPr(const mxArray *pm);
Fortran Syntax
mwPointer mxGetPr(pm)
mwPointer pm
Arguments
- pm
Pointer to an mxArray
Returns
Pointer to the first element of the real data. Returns NULL in
C (0 in Fortran) if there is no real data.
Description
Call mxGetPr to access the real data in
the mxArray that pm points to.
Once you have the starting address, you can access any other element
in the mxArray.
C Examples
See convec.c, doubleelement.c, findnz.c, fulltosparse.c, sincall.c, timestwo.c, timestwoalt.c,
and xtimesy.c
in the matlabroot/extern/examples/refbook folder
.
See Also
mxGetPi, mxSetPi, mxSetPr
 | mxGetPi (C and Fortran) | | mxGetProperty (C and Fortran) |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit