External Interfaces/API Reference |
Remove a field from a structure array
Fortran Syntax
Arguments
pm
Pointer to a structure mxArray
.
fieldnumber
The number of the field you want to remove. For instance, to remove the first field, set fieldnumber
to 1
; to remove the second field, set fieldnumber
to 2
; and so on.
Description
Call mxRemoveField
to remove a field from a structure array. If the field does not exist, nothing happens. This function does not destroy the field values. Use mxDestroyArray
to destroy the actual field values.
Consider a MATLAB structure initialized to
patient.name = 'John Doe'; patient.billing = 127.00; patient.test = [79 75 73; 180 178 177.5; 220 210 205];
The fieldnumber
1
represents the field name name
; fieldnumber
2
represents field name billing
; fieldnumber
3
represents field name test
.
See Also
mxAddField
, mxDestroyArray
, mxGetFieldByNumber
mxRealloc | mxSetCell |