Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

mxIsStruct (C and Fortran) - Determine whether input is structure mxArray

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, mxGetFieldName and mxSetField) require a structure mxArray as an argument.

C Examples

See phonebook.c in the matlabroot/extern/examples/refbook folder .

See Also

mxCreateStructArray, mxCreateStructMatrix, mxGetNumberOfFields, mxGetField, mxSetField

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS