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

Arguments

pm

Pointer to an mxArray

Returns

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

Description

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'

Examples

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