This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mxIsStruct (C and Fortran)

Determine whether input is structure array

C Syntax

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

Fortran Syntax

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



Pointer to an mxArray


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


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.


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

Introduced before R2006a

Was this topic helpful?