External Interfaces Reference |
Get number of fields in structure mxArray
Fortran Syntax
Arguments
pm
Pointer to a structure mxArray
.
Returns
The number of fields, on success. Returns 0
on failure of if no fields exist. The most common cause of failure is that pm
is not a structure mxArray
. Call mxIsStruct
to determine if pm
is a structure.
Description
Call mxGetNumberOfFields
to determine how many fields are in the specified structure mxArray
.
Once you know the number of fields in a structure, it is easy to loop through every field to set or to get field values.
See Also
mxGetField
, mxIsStruct
, mxSetField
mxGetNumberOfElements | mxGetNzmax |
© 1994-2005 The MathWorks, Inc.