Main Content

mxGetClassID (C)

Class of mxArray

C Syntax

#include "matrix.h" mxClassID mxGetClassID(const mxArray *pm);

Description

UsemxGetClassIdto determine the class of anmxArray. The class of anmxArrayidentifies the kind of data themxArrayis holding. For example, ifpmpoints to a logicalmxArray, thenmxGetClassIdreturnsmxLOGICAL_CLASS(in C).

mxGetClassIdis likemxGetClassName, except that the former returns the class as an integer identifier and the latter returns the class as a string.

Input Arguments

expand all

Pointer to anmxArrayarray, specified asconst mxArray*.

Output Arguments

expand all

Numeric identifier of the class (category) of themxArray, specified asmxClassID. For a list of C-language class identifiers, see themxClassIDfunction. For user-defined types,mxGetClassIdreturns a unique value identifying the class of the array contents. UsemxIsClassto determine whether an array is of a specific user-defined type.

Examples

See these examples inmatlabroot/extern/examples/mex:

See these examples inmatlabroot/extern/examples/refbook:

Introduced before R2006a