Also update the URL to the CeCILL license. Thanks to Paul for noticing that
[scilab.git] / scilab / modules / elementary_functions / help / en_US / matrixmanipulation / flipdim.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) 2008 - INRIA - Farid BELAHCENE
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.1-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:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="flipdim" xml:lang="en">
14     <refnamediv>
15         <refname>flipdim</refname>
16         <refpurpose>flip x components along a given dimension</refpurpose>
17     </refnamediv>
18     <refsynopsisdiv>
19         <title>Calling Sequence</title>
20         <synopsis>y=flipdim(x,dim)</synopsis>
21     </refsynopsisdiv>
22     <refsection>
23         <title>Arguments</title>
24         <variablelist>
25             <varlistentry>
26                 <term>x</term>
27                 <listitem>
28                     <para>a scalar, a vector or an array of real or complex numbers.</para>
29                 </listitem>
30             </varlistentry>
31             <varlistentry>
32                 <term>dim</term>
33                 <listitem>
34                     <para>a positive integer</para>
35                 </listitem>
36             </varlistentry>
37             <varlistentry>
38                 <term>y</term>
39                 <listitem>
40                     <para>a scalar, a vector or an array of reals</para>
41                 </listitem>
42             </varlistentry>
43         </variablelist>
44     </refsection>
45     <refsection>
46         <title>Description</title>
47         <para>
48             Given <literal>x</literal>, a scalar/vector/array of real or complex numbers and
49             <literal>dim</literal> a positive integer, this function flips the x
50             components along the dimension number <literal>dim</literal> of
51             <literal>x</literal> (<literal>x</literal> and <literal>y</literal> have
52             the same size)
53         </para>
54     </refsection>
55     <refsection>
56         <title>Examples</title>
57         <programlisting role="example"><![CDATA[ 
58 // example 1: flip x components along the first dimension
59 x=[1 2 3 4; 5 6 7 8];
60 dim=1;
61 y=flipdim(x,dim)
62
63 // example 2: flip x components along the second dimension
64 dim=2;
65 y=flipdim(x,dim)
66
67 // example 3: flip x components along the third dimension
68 x=matrix(1:48,[3 2,4,2]);
69 dim=3;
70 y=flipdim(x,dim)
71
72 // Example 4: the first example with complex
73 x=[1+%i 2*%i 3 4; 5 6-%i 7 8*%pi*%i];
74 dim=1;
75 y=flipdim(x,dim)
76
77  ]]></programlisting>
78     </refsection>
79 </refentry>