MATLAB Application Program Interface | Search  Help Desk |
mxGetNumberOfElements | Examples See Also |
Get number of elements in an array
#include "matrix.h" int mxGetNumberOfElements(const mxArray *array_ptr);array_ptr
mxArray
.
Number of elements in the specified mxArray
.
mxGetNumberOfElements
tells you how many "pieces" an array has. Use mxGetClassID
to find out what the pieces are. These two functions provide the highest-level information about an array.
See mxgetnumberofelements.c
in the mx
subdirectory of the examples
directory.
mxGetDimensions
, mxGetM
, mxGetN
, mxGetClassID
, mxGetClassName