Class of mxArray
#include "matrix.h" mxClassID mxGetClassID(const mxArray *pm);
UsemxGetClassId
to determine the class of anmxArray
. The class of anmxArray
identifies the kind of data themxArray
is holding. For example, ifpm
points to a logicalmxArray
, thenmxGetClassId
returnsmxLOGICAL_CLASS
(in C).
mxGetClassId
is likemxGetClassName
, except that the former returns the class as an integer identifier and the latter returns the class as a string.
See these examples in
:matlabroot
/extern/examples/mex
See these examples in
:matlabroot
/extern/examples/refbook