| MATLAB Application Program Interface | Search  Help Desk |
| mxGetNumberOfDimensions | Examples See Also |
C Syntax
#include "matrix.h" int mxGetNumberOfDimensions(const mxArray *array_ptr);
Arguments
array_ptrmxArray.
Returns
The number of dimensions in the specifiedmxArray. The returned value is always 2 or greater.
Description
UsemxGetNumberOfDimensions to determine how many dimensions are in the specified array. To determine how many elements are in each dimension, call mxGetDimensions.
Examples
Seeexplore.c in the mex subdirectory of the examples directory.
For additional examples, see findnz.c, fulltosparse.c, and phonebook.c in the refbook subdirectory of the examples directory; see mxcalcsinglesubscript.c, mxgeteps.c, and mxisfinite.c in the mx subdirectory of the examples directory.
See Also
mxSetM, mxSetN