Typo fixes
[scilab.git] / scilab / modules / signal_processing / help / en_US / ifftshift.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) 2013 - Scilab Enterprises - Paul Bignier
5  *
6  * Copyright (C) 2012 - 2016 - Scilab Enterprises
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14  -->
15 <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="ifftshift">
16     <refnamediv>
17         <refname>ifftshift</refname>
18         <refpurpose>inverse of fftshift</refpurpose>
19     </refnamediv>
20     <refsynopsisdiv>
21         <title>Syntax</title>
22         <synopsis>y=ifftshift(x)</synopsis>
23     </refsynopsisdiv>
24     <refsection>
25         <title>Arguments</title>
26         <variablelist>
27             <varlistentry>
28                 <term>x, y</term>
29                 <listitem>
30                     <para>real or complex vector or matrix.</para>
31                 </listitem>
32             </varlistentry>
33         </variablelist>
34     </refsection>
35     <refsection>
36         <title>Description</title>
37         <para>
38             <literal>ifftshift(x)</literal> swaps the left and right halves of the vector <literal>x</literal>.
39         </para>
40         <para>
41             For matrices, <literal>ifftshift(x)</literal> swaps the first quadrant with the third and the second quadrant with the fourth.
42         </para>
43         <para>
44             If <literal>x</literal> is a multidimensional array,
45             <literal>ifftshift(x)</literal> swaps "half-spaces" of <literal>x</literal> along each dimension.
46         </para>
47     </refsection>
48     <refsection>
49         <title>Examples</title>
50         <para>
51             Example #1:
52         </para>
53         <programlisting role="example"><![CDATA[
54 // Make a signal
55 t = 0:0.1:1000;
56 x = 3*sin(t)+8*sin(3*t)+0.5*sin(5*t)+3*rand(t);
57 // Compute the fft
58 y = fft(x, -1);
59 // Invert the result
60 shift = fftshift(y);
61 // Invert the inverted result
62 invShift = ifftshift(shift);
63 // Check that we recreated the original result
64 and(y == invShift)
65  ]]></programlisting>
66         <para>
67             Example #2:
68         </para>
69         <programlisting role="example"><![CDATA[
70 // Make a 2D image
71 t = 0:0.1:30;
72 x = 3*sin(t')*cos(2*t)+8*sin(3*t')*sin(5*t)+..
73   0.5*sin(5*t')*sin(5*t)+3*rand(t')*rand(t);
74 // Compute the fft
75 y = fft(x,-1);
76
77 // Invert the result
78 shift = fftshift(y);
79 // Invert the inverted result
80 invShift = ifftshift(shift);
81 // Check that we recreated the original result
82 and(y == invShift)
83  ]]></programlisting>
84     </refsection>
85     <refsection role="see also">
86         <title>See Also</title>
87         <simplelist type="inline">
88             <member>
89                 <link linkend="fftshift">fftshift</link>
90             </member>
91             <member>
92                 <link linkend="fft">fft</link>
93             </member>
94         </simplelist>
95     </refsection>
96 </refentry>