External Interfaces Reference |
C Syntax
Arguments
array_ptr
Pointer to an mxArray
.
Returns
The class (category) of the mxArray
that array_ptr
points to. Classes are:
mxUNKNOWN_CLASS
The class cannot be determined. You cannot specify this category for an mxArray
; however, mxGetClassID
can return this value if it cannot identify the class.
mxCELL_CLASS
Identifies a cell mxArray
.
mxSTRUCT_CLASS
Identifies a structure mxArray
.
mxCHAR_CLASS
Identifies a string mxArray
; that is an mxArray
whose data is represented as mxCHAR
's.
mxLOGICAL_CLASS
Identifies a logical mxArray
; that is, an mxArray
that stores the logical values 1
and 0
, representing the states true
and false
respectively.
mxDOUBLE_CLASS
Identifies a numeric mxArray
whose data is stored as double-precision, floating-point numbers.
mxSINGLE_CLASS
Identifies a numeric mxArray
whose data is stored as single-precision, floating-point numbers.
mxINT8_CLASS
Identifies a numeric mxArray
whose data is stored as signed 8-bit integers.
mxUINT8_CLASS
Identifies a numeric mxArray
whose data is stored as unsigned 8-bit integers.
mxINT16_CLASS
Identifies a numeric mxArray
whose data is stored as signed 16-bit integers.
mxUINT16_CLASS
Identifies a numeric mxArray
whose data is stored as unsigned 16-bit integers.
mxINT32_CLASS
Identifies a numeric mxArray
whose data is stored as signed 32-bit integers.
mxUINT32_CLASS
Identifies a numeric mxArray
whose data is stored as unsigned 32-bit integers.
mxINT64_CLASS
Identifies a numeric mxArray
whose data is stored as signed 64-bit integers.
mxUINT64_CLASS
Identifies a numeric mxArray
whose data is stored as unsigned 64-bit integers.
mxFUNCTION_CLASS
Identifies a function handle mxArray
.
Description
Use mxGetClassId
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 logical mxArray
, then mxGetClassID
returns mxLOGICAL_CLASS
.
mxGetClassID
is similar to mxGetClassName
, except that the former returns the class as an integer identifier and the latter returns the class as a string.
Examples
See phonebook.c
in the refbook
subdirectory of the examples
directory and explore.c
in the mex
subdirectory of the examples
directory.
See Also
mxGetChars | mxGetClassName |
© 1994-2005 The MathWorks, Inc.