mxAddField (C and Fortran) - Add field to structure array
C Syntax
#include "matrix.h"
extern int mxAddField(mxArray *pm, const char *fieldname);
Fortran Syntax
integer*4 mxAddField(pm, fieldname)
mwPointer pm
character*(*) fieldname
Arguments
- pm
Pointer to a structure mxArray
- fieldname
Name of the field you want to add
Returns
Field number on success, or -1 if
inputs are invalid or an out-of-memory condition occurs.
Description
Call mxAddField to add a field to a structure
array. You must then create the values with the mxCreate*
functions and use mxSetFieldByNumber to set the
individual values for the field.
See Also
mxRemoveField, mxSetFieldByNumber
 | mwSize (C and Fortran) | | mxArray (C and Fortran) |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit