list field extraction
[x,...] = getfield(i,l)
matrix of any possible types.
list
, tlist
or mlist
variable.
field index, see extraction for more details.
This function is an equivalent of [x,...]=l(i)
syntax for field
extraction with the only difference that it also applies to
mlist
objects.
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) | ![]() | ![]() |