mxIsClass (C)
Determine whether mxArray is object of specified class
C Syntax
#include "matrix.h" bool mxIsClass(const mxArray *pm, const char *classname);
Returns
Logical 1 (true) if pm points
to an array having category classname, and logical
0 (false) otherwise.
Description
Each mxArray is tagged as being a certain type.
mxIsClass returns logical 1
(true) if the mxArray is of the specified
type. Otherwise, the function returns logical 0
(false).
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")==0;
It is more efficient to use the mxIsDouble form.
Input Arguments
Examples
To open an example, type:
edit([fullfile(matlabroot,"extern","examples","mx","filename")]);
where filename is:
Version History
Introduced before R2006a