Skip to content

rmfield

builtin · libnexusinterp/nexus-value/ov-struct-proprietary.cc

: sout = rmfield (s, "f")
: sout = rmfield (s, f)

Return a copy of structure s with one or more fields deleted.

The original s is left untouched; the dropped field is absent from the returned copy throughout the structure array. f may name a single field, or be a cell array or character array naming several, in which case each is removed in turn. Every name in f must be an existing field of s; naming a field that is not present is an error. Two arguments are required.