Elementary functions: improved help pages.
[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-en.txt
11  *
12  -->
13 <refentry version="5.0-subset Scilab" xml:id="flipdim" xml:lang="en"
14           xmlns="http://docbook.org/ns/docbook"
15           xmlns:xlink="http://www.w3.org/1999/xlink"
16           xmlns:svg="http://www.w3.org/2000/svg"
17           xmlns:ns5="http://www.w3.org/1999/xhtml"
18           xmlns:mml="http://www.w3.org/1998/Math/MathML"
19           xmlns:db="http://docbook.org/ns/docbook">
20   <info>
21     <pubdate>$LastChangedDate$</pubdate>
22   </info>
23
24   <refnamediv>
25     <refname>flipdim</refname>
26
27     <refpurpose>flip x components along a given dimension</refpurpose>
28   </refnamediv>
29
30   <refsynopsisdiv>
31     <title>Calling Sequence</title>
32
33     <synopsis>y=flipdim(x,dim)</synopsis>
34   </refsynopsisdiv>
35
36   <refsection>
37     <title>Arguments</title>
38
39     <variablelist>
40       <varlistentry>
41         <term>x</term>
42
43         <listitem>
44           <para>a scalar, a vector or an array of reals</para>
45         </listitem>
46       </varlistentry>
47
48       <varlistentry>
49         <term>dim</term>
50
51         <listitem>
52           <para>a positive integer</para>
53         </listitem>
54       </varlistentry>
55
56       <varlistentry>
57         <term>y</term>
58
59         <listitem>
60           <para>a scalar, a vector or an array of reals</para>
61         </listitem>
62       </varlistentry>
63     </variablelist>
64   </refsection>
65
66   <refsection>
67     <title>Description</title>
68
69     <para>Given <literal>x</literal>, a scalar/vector/array of reals and
70     <literal>dim</literal> a positive integer, this function flips the x
71     components along the dimension number <literal>dim</literal> of
72     <literal>x</literal> (<literal>x</literal> and <literal>y</literal> have
73     the same size)</para>
74   </refsection>
75
76   <refsection>
77     <title>Examples</title>
78
79     <programlisting role="example"><![CDATA[ 
80 // example 1: flip x components along the first dimension
81 x=[1 2 3 4; 5 6 7 8];
82 dim=1;
83 y=flipdim(x,dim)
84
85 // example 2: flip x components along the second dimension
86 dim=2;
87 y=flipdim(x,dim)
88
89 // example 3: flip x components along the third dimension
90 x=matrix(1:48,[3 2,4,2]);
91 dim=3;
92 y=flipdim(x,dim)
93  ]]></programlisting>
94   </refsection>
95
96   <refsection>
97     <title>Authors</title>
98
99     <para>F.Belahcene</para>
100   </refsection>
101 </refentry>