| MATLAB® | ![]() |
#include "matrix.h" void *mxGetData(const mxArray *pm);
mwPointer mxGetData(pm) mwPointer pm
Pointer to an mxArray
The address of the first element of the real data. Returns NULL in C (0 in Fortran) if there is no real data.
Similar to mxGetPr, except that in C, mxGetData returns a void *.
To copy values from the returned pointer to Fortran, use one of the mxCopyPtrTo* functions in the following manner:
C Get the data in mxArray, pm
mxCopyPtrToReal8(mxGetData(pm), data,
+ mxGetNumberOfElements(pm))See phonebook.c in the refbook subdirectory of the examples directory.
For additional examples, see mxcreatecharmatrixfromstr.c and mxisfinite.c in the mx subdirectory of the examples directory.
![]() | mxGetClassName (C and Fortran) | mxGetDimensions (C and Fortran) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |