mxCreateStructArray (Fortran)
N-D structure array
Fortran Syntax
#include "fintrf.h" mwPointer mxCreateStructArray(ndim, dims, nfields, fieldnames) mwSize ndim mwSize dims(ndim) integer*4 nfields character*(*) fieldnames(nfields)
Description
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
.
Each field holds one mxArray
pointer initialized to
0
. Call mxSetField
or
mxSetFieldByNumber
to place a non-0
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
. The mxDestroyArray
function deallocates the
mxArray
and its associated elements.
Input Arguments
Output Arguments
Version History
Introduced before R2006a
See Also
mxDestroyArray
| mxAddField
| mxRemoveField
| mxSetField
| mxSetFieldByNumber
| namelengthmax
| mxCreateStructMatrix