Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: Français - Português - 日本語 - Русский

Please note that the recommended version of Scilab is 6.1.0. This page might be outdated.
See the recommended documentation of this function

Scilab Help >> Data Structures > fieldnames


get a tlist, mlist or struct fields names


f = fieldnames(lst)



A tlist, mlist or struct variable.


Strings column vector of fields names.


The fieldnames function returns field names of a tlist, mlist or struct. fieldnames does not work on cells.

As said in rational or syslin help pages, internal representation of some Scilab objects is a tlist (or rlist), so using fieldnames with them will return the generic forms of these objects. For example, for rationals, the function will return "num","den" and "dt".


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;

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
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Feb 14 15:02:52 CET 2017