Quantcast

Documentation Center

  • Trial Software
  • Product Updates

mxIsStruct (C and Fortran)

Determine whether input is structure array

C Syntax

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

Fortran Syntax

integer*4 mxIsStruct(pm)
mwPointer pm

Arguments

pm

Pointer to an mxArray

Returns

Logical 1 (true) if pm points to a structure mxArray, and logical 0 (false) otherwise.

Description

Use mxIsStruct to determine whether pm points to a structure mxArray. Many routines (for example, mxGetFieldNameByNumber and mxSetField) require a structure mxArray as an argument.

Examples

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

Was this topic helpful?