Skip to content

getfields

miscellaneous · scripts/miscellaneous/getfields.m

GETFIELDS  Extract structure field values as a cell (Octave name).
  C = GETFIELDS(S) returns a cell array of the values of all fields
  of structure S, in fieldnames order.
  C = GETFIELDS(S, F1, F2, ...) returns the values of the named
  fields only.
  MATLAB portable path: struct2cell(S) or {S.(f1), S.(f2), ...}.
  Unmarked MATLAB-mode scripts that never call this name are
  unaffected.

  See also SETFIELDS, GETFIELD, FIELDNAMES, STRUCT2CELL.