Skip to content

substruct

miscellaneous · scripts/miscellaneous/substruct.m

: s = substruct (type1, subs1, type2, subs2, …)

Build the index description used by subsref and subsasgn.

Each type is "()", "{}" or "." and each subs is a cell array of subscripts (for "()" and "{}") or a field name (for "."). The result is a 1xN struct array with the fields type and subs.