| MATLAB Application Program Interface | Search  Help Desk |
| mxGetClassName | Examples See Also |
Get (as a string) an mxArray's class
C Syntax
#include "matrix.h" const char *mxGetClassName(const mxArray *array_ptr);
Arguments
array_ptrmxArray.
Returns
The class (as a string) ofarray_ptr.
Description
CallmxGetClassName to determine the class of an mxArray. The class of an mxArray identifies the kind of data the mxArray is holding. For example, if array_ptr points to a sparse mxArray, then mxGetClassName returns sparse.
mxGetClassID is similar to mxGetClassName, except that the former returns the class as an enumerated value and the latter returns the class as a string.
Examples
Seemexfunction.c in the mex subdirectory of the examples directory. For an additional example, see mxisclass.c in the mx subdirectory of the examples directory.
See Also
mxGetClassID