Documentation Center

  • Trial Software
  • Product Updates

mxIsChar (C and Fortran)

Determine whether input is string array

C Syntax

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

Fortran Syntax

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 string mxArray.

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 the following examples in matlabroot/extern/examples/refbook.

See the following examples in matlabroot/extern/examples/mx.

Was this topic helpful?