N-D structure array
#include "matrix.h" mxArray *mxCreateStructArray( mwSize ndim, const mwSize *dims, int nfields, const char **fieldnames);
Call mxCreateStructArray
to create an unpopulated structure
mxArray
. Each element of a structure mxArray
contains
the same number of fields (specified in nfields
). Each field has a name,
specified in fieldnames
. A MATLAB® structure mxArray
is conceptually identical to an array of
structs
in the C language.
Each field holds one mxArray
pointer initialized to
NULL
. Call mxSetField
or
mxSetFieldByNumber
to place a non-NULL
mxArray
pointer in a field.
The function automatically removes trailing singleton dimensions specified in the
dims
argument. For example, if ndim
equals
5
and dims
equals [4 1 7 1 1]
, then
the dimensions of the resulting array are
4
-by-1
-by-7
.
Call mxDestroyArray
when you finish using the
mxArray
to deallocate the mxArray
and its associated
real and imaginary elements.
mxAddField
| mxDestroyArray
| mxRemoveField
| mxSetField
| mxSetFieldByNumber
| namelengthmax