Determine whether array is object of specified class
#include "matrix.h" bool mxIsClass(const mxArray *pm, const char *classname);
#include "fintrf.h" integer*4 mxIsClass(pm, classname) mwPointer pm character*(*) classname
pm
Pointer to an mxArray
classname
Array category to test. Specify classname
as a string
(not as an integer identifier). You can specify any one of the following
predefined constants:
Value of |
Corresponding Class |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In the table, <class_name>
represents the name of a
specific MATLAB® custom object. You can also specify one of your own class names.
Logical 1
(true
) if pm
points
to an array having category classname
, and logical
0
(false
) otherwise.
Each mxArray
is tagged as being a certain type. Call
mxIsClass
to determine whether the specified
mxArray
has this type. MATLAB does not check if the class is derived from a base class.
In C:
mxIsClass(pm, "double");
is equivalent to calling either of these forms:
mxIsDouble(pm); strcmp(mxGetClassName(pm), "double");
In Fortran:
mxIsClass(pm, 'double')
is equivalent to calling either one of the following:
mxIsDouble(pm) mxGetClassName(pm) .eq. 'double'
It is most efficient to use the mxIsDouble
form.