This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

mxIsChar (C and Fortran)

Determine whether input is mxChar array

C Syntax

#include "matrix.h"
bool mxIsChar(const mxArray *pm);

Fortran Syntax

#include "fintrf.h"
integer*4 mxIsChar(pm)
mwPointer pm



Pointer to an mxArray


Logical 1 (true) if pm points to an array having the class mxCHAR_CLASS, and logical 0 (false) otherwise.


Use mxIsChar to determine whether pm points to an mxChar array.

In C, calling mxIsChar is equivalent to calling:

mxGetClassID(pm) == mxCHAR_CLASS

In Fortran, calling mxIsChar is equivalent to calling:

mxGetClassName(pm) .eq. 'char'


See these examples in matlabroot/extern/examples/refbook:

See these examples in matlabroot/extern/examples/mx:

See these examples in matlabroot/extern/examples/eng_mat:

Introduced before R2006a