rmfield
Returns a copy of the structure s with the field f removed.
Syntax
rmfield(s,'f')
Inputs
- s
 - Struct.
 - f
 - Field to be removed.
 
Outputs
- R
 - Resulting struct. The original struct s is not modified.
 
Example
Simple rmfield example.
a = struct('name', {'Bob', 'Dave'}, 'age', {33, 44});
R = rmfield(a, 'age');
R(1)
R(2)
      ans = struct [
name: Bob
]
ans = struct [
name: Dave
]