1 <?xml version="1.0" encoding="UTF-8"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2006-2008 - INRIA
6 * This file must be used under the terms of the CeCILL.
7 * This source file is licensed as described in the file COPYING, which
8 * you should have received as part of this distribution. The terms
9 * are also available at
10 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
13 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="getfield">
15 <refname>getfield</refname>
16 <refpurpose>list field extraction</refpurpose>
19 <title>Calling Sequence</title>
20 <synopsis>[x,...] = getfield(i,l)</synopsis>
23 <title>Arguments</title>
28 <para>matrix of any possible types.</para>
35 <literal>list</literal>, <literal>tlist</literal> or <literal>mlist</literal> variable.
43 field index, see <link linkend="extraction">extraction</link> for more details.
50 <title>Description</title>
52 This function is an equivalent of <literal>[x,...]=l(i)</literal> syntax for field
53 extraction with the only difference that it also applies to
54 <literal>mlist</literal> objects.
58 <title>Examples</title>
59 <programlisting role="example"><![CDATA[
61 [a,b]=getfield([3 2],l)
63 a=hypermat([2,2,2],rand(1:2^3));// hypermatrices are coded using mlists
64 a(1) // the a(1,1,1) entry
65 getfield(1,a) // the mlist first field
68 <refsection role="see also">
69 <title>See Also</title>
70 <simplelist type="inline">
72 <link linkend="extraction">extraction</link>