<< namedargs2cell Data structures setfield >>

rmfield


Remove fields from structure.


Syntax


s = rmfield(st, field)

Input argument


st

a structure.

field

a string, cell of strings, or char.

Output argument


s

a structure without field.

Description


s = rmfield(st, field) removes the specified field from structure array.

Example


example.a = 1
example.b = 'nelson'
example.c = []
rmfield(example, 'b')

See also


struct, fieldnames.

History


Version Description
1.0.0 initial version

Author


Allan CORNET

<< namedargs2cell Data structures setfield >>