* Bug #10523 fixed - The fact that flipdim could manage complex matrices was
[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 real or complex numbers.</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>
70       Given <literal>x</literal>, a scalar/vector/array of real or complex numbers and
71       <literal>dim</literal> a positive integer, this function flips the x
72       components along the dimension number <literal>dim</literal> of
73       <literal>x</literal> (<literal>x</literal> and <literal>y</literal> have
74       the same size)
75     </para>
76   </refsection>
77   
78   <refsection>
79     <title>Examples</title>
80     
81     <programlisting role="example"><![CDATA[ 
82 // example 1: flip x components along the first dimension
83 x=[1 2 3 4; 5 6 7 8];
84 dim=1;
85 y=flipdim(x,dim)
86
87 // example 2: flip x components along the second dimension
88 dim=2;
89 y=flipdim(x,dim)
90
91 // example 3: flip x components along the third dimension
92 x=matrix(1:48,[3 2,4,2]);
93 dim=3;
94 y=flipdim(x,dim)
95
96 // Example 4: the first example with complex
97 x=[1+%i 2*%i 3 4; 5 6-%i 7 8*%pi*%i];
98 dim=1;
99 y=flipdim(x,dim)
100
101  ]]></programlisting>
102   </refsection>
103   
104   <refsection>
105     <title>Authors</title>
106     
107     <para>F.Belahcene</para>
108   </refsection>
109 </refentry>