External Interfaces/API Reference | ![]() ![]() |
Add a field to a structure array
C Syntax
#include "matrix.h" extern int mxAddField(mxArray array_ptr, const char *field_name);
Arguments
array_ptr
Pointer to a structure mxArray
.
field_name
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
![]() | C MX-Functions | mxArrayToString | ![]() |