Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.0 - 日本語

Change language to:
English - Français - Português - Русский

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

Scilabヘルプ >> Data Structures > getfield

getfield

リストのフィールドの展開

呼び出し手順

[x,...]=getfield(i,l)

パラメータ

x

任意の型の行列

l

list, tlist または mlist変数

i

フィールド添え字, 詳細は extraction 参照.

説明

この関数は, フィールド展開用の [x,...]=l(i) 構文と等価ですが, 唯一の違いは, mlist オブジェクトにも適用できる ことです.

l=list(1,'qwerw',%s)
[a,b]=getfield([3 2],l)

// Rationals are encoded as t-lists:
r = [%z/(1-%z) %z^2/(1+%z)]
type(r)
[num, den] = getfield([2 3],r)

// Structures arrays are encoded as M-lists:
s.r = %pi
s.b = %t
s.t = "Scilab"
s(2).t = "Basile"
getfield(2,s)==size(s)
getfield(1,s)(3:5)==fieldnames(s)'
[r,b,t] = getfield([3 4 5],s)

参照

  • extraction — 行列およびリストのエントリの展開
Report an issue
<< fieldnames Data Structures isfield >>

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:
Tue Feb 25 08:53:23 CET 2020