Number of fields in structure array
Number of fields, on success. Returns 0 on failure. The most common cause of failure is that pm is not a structure mxArray. Call mxIsStruct to determine whether pm is a structure.
Call mxGetNumberOfFields to determine how many fields are in the specified structure mxArray.
Once you know the number of fields in a structure, you can loop through every field in order to set or to get field values.
See the following examples in matlabroot/extern/examples/refbook.
See the following examples in matlabroot/extern/examples/mx.
See the following examples in matlabroot/extern/examples/mex.