Download Sysquake Remote User Manual

Transcript
LME Reference — lists
331
Syntax
listout = apply(fun, listin)
listout = apply(fun, listin, nargout)
Description
listout=apply(fun,listin) evaluates function fun with input arguments taken from the elements of list listin. Output arguments are
grouped in list listout. Function fun is specified either by its name
as a string or by an inline function.
The number of expected output arguments can be specified with
an optional third input argument nargout.
Examples
apply(’min’, {5, 7})
{5}
apply(’size’,{magic(3)},2)
{3, 3}
apply(inline(’2*x+3*y’,’x’,’y’), {5, 10})
{40}
See also
map, feval, inline, operator @
join
List concatenation.
Syntax
list = join(l1, l2, ...)
Description
join(l1,l2,...) joins elements of lists l1, l2, etc. to make a larger
list.
Examples
join({1,’a’,2:5}, {4,2}, {{’xxx’}})
{1,’a’,[2,3,4,5],4,2,{’xxx’}}