Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2024.1.0 - Français


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 — Objet Scilab, Définition d'une liste
  • tlist — Objet Scilab. Définition d'une liste typée
  • mlist — Objet Scilab, définition d'une liste typée
  • insertion — insertion/modification dans une variable
  • extraction — extraction à partir d'une matrice ou d'une liste
Report an issue
<< bool2s Listes Structures Cells fieldnames >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jun 17 17:52:28 CEST 2024