| MATLAB Application Program Interface | Search  Help Desk |
| mxCreateStructMatrix | Examples See Also |
Create an unpopulated two-dimensional structure mxArray
C Syntax
#include "matrix.h" mxArray *mxCreateStructMatrix(int m, int n, int nfields, const char **field_names);
Arguments
mReturns
A pointer to the created structuremxArray, if successful; otherwise, returns NULL. The most likely cause of failure is insufficient heap space to hold the returned mxArray.
Description
mxCreateStructMatrix and mxCreateStructArray are almost identical. The only difference is that mxCreateStructMatrix can only create two-dimensional mxArrays, while mxCreateStructArray can create mxArrays having two or more dimensions.
Example
Seephonebook.c in the refbook subdirectory of the examples directory.
See Also
mxCreateStructArray, mxGetFieldByNumber, mxGetFieldNameByNumber, mxGetFieldNumber, mxIsStruct