Get structure field names in recursive manner
by Adam
13 Oct 2011
Returns the field names of a structure, include the field names of any "sub-structures".
|
Watch this File
|
| File Information |
| Description |
NAMES = fieldnamesr(S) returns a cell array of strings containing the structure field names associated with s, the structure field names of any structures which are fields of s, any structures which are fields of fields of s, and so on.
NAMES = fieldnamesr(S,DEPTH) is an optional field which allows the depth of the search to be defined. Default is -1, which does not limit the search by depth. A depth of 1 will return only the field names of s (behaving like FIELDNAMES). A depth of 2 will return those field names, as well as the field names of any structure which is a field of s, and so on.
NAMES = fieldnamesr(...,'full') returns the names of fields which are structures, as well as the contents of those structures, as separate cells. This is unlike the default where a structure-tree is returned.
NAMES = fieldnamesr(...,'prefix') returns the names of the fields prefixed by the name of the input structure.
NAMES = fieldnamesr(...,'struct') returns only the names of fields which are structures. |
| MATLAB release |
MATLAB 7.13 (R2011b)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
|
Contact us