External Interfaces Reference Previous page   Next Page
mxIsClass

Determine if mxArray is member of specified class

C Syntax

Arguments

array_ptr
   Pointer to an array.

name
   The array category that you are testing. Specify name as a string (not as an integer identifier). You can specify any one of the following predefined constants:

Value of Name
Corresponding Class
cell
mxCELL_CLASS
char
mxCHAR_CLASS
double
mxDOUBLE_CLASS
function handle
mxFUNCTION_CLASS
int8
mxINT8_CLASS
int16
mxINT16_CLASS
int32
mxINT32_CLASS
int64
mxINT64_CLASS
logical
mxLOGICAL_CLASS
single
mxSINGLE_CLASS
struct
mxSTRUCT_CLASS
uint8
mxUINT8_CLASS
uint16
mxUINT16_CLASS
uint32
mxUINT32_CLASS
uint64
mxUINT64_CLASS
<class_name>
<class_id>
unknown
mxUNKNOWN_CLASS

In the table, <class_name> represents the name of a specific MATLAB custom object.

Or, you can specify one of your own class names.

For example,

is equivalent to calling

which is equivalent to calling

Note that it is most efficient to use the mxIsDouble form.

Returns

Logical 1 (true) if array_ptr points to an array having category name, and logical 0 (false) otherwise.

Description

Each mxArray is tagged as being a certain type. Call mxIsClass to determine if the specified mxArray has this type.

Examples

See mxisclass.c in the mx subdirectory of the examples directory.

See Also

mxIsEmpty, mxGetClassID, mxClassID


Previous page  mxIsChar mxIsComplex Next page

© 1994-2005 The MathWorks, Inc.