Revision of English help pages for different functions (nothing serious).
[scilab.git] / scilab / modules / data_structures / help / en_US / getfield.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2006-2008 - INRIA
5  *
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
11  *
12  -->
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">
14     <refnamediv>
15         <refname>getfield</refname>
16         <refpurpose>list field extraction</refpurpose>
17     </refnamediv>
18     <refsynopsisdiv>
19         <title>Calling Sequence</title>
20         <synopsis>[x,...] = getfield(i,l)</synopsis>
21     </refsynopsisdiv>
22     <refsection>
23         <title>Arguments</title>
24         <variablelist>
25             <varlistentry>
26                 <term>x</term>
27                 <listitem>
28                     <para>matrix of any possible types.</para>
29                 </listitem>
30             </varlistentry>
31             <varlistentry>
32                 <term>l</term>
33                 <listitem>
34                     <para>
35                         <literal>list</literal>, <literal>tlist</literal> or <literal>mlist</literal> variable.
36                     </para>
37                 </listitem>
38             </varlistentry>
39             <varlistentry>
40                 <term>i</term>
41                 <listitem>
42                     <para>
43                         field index, see <link linkend="extraction">extraction</link> for more details.
44                     </para>
45                 </listitem>
46             </varlistentry>
47         </variablelist>
48     </refsection>
49     <refsection>
50         <title>Description</title>
51         <para>
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.
55         </para>
56     </refsection>
57     <refsection>
58         <title>Examples</title>
59         <programlisting role="example"><![CDATA[
60 l=list(1,'qwerw',%s)
61 [a,b]=getfield([3 2],l)
62  
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
66  ]]></programlisting>
67     </refsection>
68     <refsection role="see also">
69         <title>See Also</title>
70         <simplelist type="inline">
71             <member>
72                 <link linkend="extraction">extraction</link>
73             </member>
74         </simplelist>
75     </refsection>
76 </refentry>