Get a tlist, mlist or struct fields names (original) (raw)
Scilab 5.3.3
- Scilab help
- Data Structures
- cell
- definedfields
- fieldnames
- getfield
- hypermat
- hypermatrices
- iscell
- iscellstr
- isfield
- isstruct
- list
- lsslist
- lstcat
- mlist
- rlist
- setfield
- struct
- tlist
Please note that the recommended version of Scilab is 2026.0.1. This page might be outdated.
See the recommended documentation of this function
Scilab help >> Data Structures > fieldnames
fieldnames
get a tlist, mlist or struct fields names
Calling Sequence
Arguments
lst
A tlist, mlist or struct variable.
f
Strings column vector of fields names.
Description
The fieldnames function returns field names of a tlist, mlist or struct. fieldnames does not work on cells.
Examples
fieldnames(tlist(['listtype', 'f1', 'f2'], [], [])) fieldnames(mlist(['V', 'key', 'value'], ['a' 'b' ; 'c' 'd'], [1 2 ; 3 4])) fieldnames(struct('f1', 25, 'month', 'DEC', 'year', 2006)) obj.x = 3; obj.y = 3; fieldnames(obj)
See Also
- extraction — matrix and list entry extraction
- getfield — list field extraction
- tlist — Scilab object and typed list definition.
- mlist — Scilab object, matrix oriented typed list definition.
- struct — create a struct