Main Content

mxGetClassName (C)

Class of mxArray as string

Use mxGetClassName for classes defined without a classdef statement.

C Syntax

#include "matrix.h"
const char *mxGetClassName(const mxArray *pm);

Description

mxGetClassName returns the class of an mxArray. The class identifies the kind of data the mxArray is holding. For example, if pm points to a logical mxArray, mxGetClassName returns logical.

mxGetClassID is similar to the mxGetClassName function.

  • mxGetClassID returns the class as an integer identifier, as described in mxClassID.

  • mxGetClassName returns the class as a string, as described in mxIsClass.

Input Arguments

expand all

Pointer to an mxArray array, specified as const mxArray*.

Output Arguments

expand all

Class name, specified as const char*.

Examples

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

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

Introduced before R2006a