| MATLAB® | ![]() |
Get number of dimensions in mxArray
#include "matrix.h" mwSize mxGetNumberOfDimensions(const mxArray *pm);
mwSize mxGetNumberOfDimensions(pm) mwPointer pm
Pointer to an mxArray
The number of dimensions in the specified mxArray. The returned value is always 2 or greater.
Use mxGetNumberOfDimensions to determine how many dimensions are in the specified array. To determine how many elements are in each dimension, call mxGetDimensions.
See explore.c in the mex subdirectory of the examples directory.
Additional examples:
findnz.c, fulltosparse.c, and phonebook.c in the refbook subdirectory of the examples directory
mxcalcsinglesubscript.c, mxgeteps.c, and mxisfinite.c in the mx subdirectory of the examples directory.
mxSetM, mxSetN, mxGetDimensions
![]() | mxGetNaN (C and Fortran) | mxGetNumberOfElements (C and Fortran) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |