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 - Русский - 日本語
Scilab Help >> Data Structures > definedfields

definedfields

returns an index of list's defined fields

Syntax

k = definedfields(lst)

Arguments

lst

a list, tlist or mlist variable.

k

a vector of index.

Description

If lst is a list, a tlist, a mlist k = definedfields(lst) returns in k the indices of the defined list fields. This function is useful because indexing undefined fields produces an error.

Examples

lst=list(1);lst(3)=5
k=definedfields(lst)
 
t=tlist('x');t(5)=4
definedfields(t)
 
m=mlist(['m','a','b']);m.b='sdfgfgd'
definedfields(m)

See Also

  • list — a Scilab object and a list definition function
  • tlist — Scilab object and typed list definition.
  • mlist — Scilab object, matrix oriented typed list definition
  • insertion — partial variable assignation or modification
  • extraction — matrix and list entry extraction
Scilab Enterprises
Copyright (c) 2011-2015 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Jun 15 08:27:39 CEST 2016