| MATLAB® | ![]() |
#include "matrix.h" mwSize mxGetNumberOfElements(const mxArray *pm);
mwSize mxGetNumberOfElements(pm) mwPointer pm
Pointer to an mxArray
Number of elements in the specified mxArray
mxGetNumberOfElements tells you how many elements an array has. For example, if the dimensions of an array are 3-by-5-by-10, mxGetNumberOfElements returns the number 150.
See findnz.c and phonebook.c in the refbook subdirectory of the examples directory.
Additional examples:
explore.c in the mex subdirectory of the examples directory
mxcalcsinglesubscript.c, mxgeteps.c, mxgetinf.c, mxisfinite.c, and mxsetdimensions.c in the mx subdirectory of the examples directory
mxGetDimensions, mxGetM, mxGetN, mxGetClassID, mxGetClassName
![]() | mxGetNumberOfDimensions (C and Fortran) | mxGetNumberOfFields (C and Fortran) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |