rmfield
Remove fields from a structure.
Syntax
Section titled “Syntax”s = rmfield(s, field)Description
Section titled “Description”Returns a copy of s with the named field (or fields, if a cell array of names is given) removed.
Examples
Section titled “Examples”s.a = 1; s.b = 2; s.c = 3;rmfield(s, 'b') % struct with fields a, c onlyrmfield(s, {'a', 'c'}) % struct with field b onlySee also
Section titled “See also”setfield— Set the value of a structure field by name.fieldnames— List of field names in a structure.