mxGetClassName (C and Fortran) - Get class of mxArray as string
C Syntax
#include "matrix.h"
const char *mxGetClassName(const mxArray *pm);
Fortran Syntax
character*(*) mxGetClassName(pm)
mwPointer pm
Arguments
- pm
Pointer to an mxArray
Returns
Class (as a string) of the mxArray pointed
to by pm.
Description
Call mxGetClassName to determine the class
of an mxArray. The class of an mxArray identifies
the kind of data the mxArray is holding. For example,
if pm points to a logical mxArray, mxGetClassName returns logical.
mxGetClassID is similar to mxGetClassName,
except that the former returns the class as an integer identifier,
as listed in the mxClassID reference
page, and the latter returns the class as a string, as listed in the mxIsClass reference page.
C Examples
See mexfunction.c
in the matlabroot/extern/examples/mex folder
. For an additional example, see mxisclass.c
in the matlabroot/extern/examples/mx folder
.
See Also
mxGetClassID, mxIsClass
 | mxGetClassID (C and Fortran) | | mxGetData (C and Fortran) |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit