Typo fixes
[scilab.git] / scilab / modules / signal_processing / help / en_US / fft2.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <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="fft2">
3     <refnamediv>
4         <refname>fft2</refname>
5         <refpurpose>two-dimension fast Fourier
6             transform
7         </refpurpose>
8     </refnamediv>
9     <refsynopsisdiv>
10         <title>Syntax</title>
11         <synopsis>y=fft2(x)
12             y=fft2(x,n,m)
13         </synopsis>
14     </refsynopsisdiv>
15     <refsection>
16         <title>Arguments</title>
17         <variablelist>
18             <varlistentry>
19                 <term>x</term>
20                 <listitem>
21                     <para>a vector/matrix/array (Real or Complex)</para>
22                 </listitem>
23             </varlistentry>
24             <varlistentry>
25                 <term>y</term>
26                 <listitem>
27                     <para>a vector/matrix/array (Real or Complex)</para>
28                 </listitem>
29             </varlistentry>
30             <varlistentry>
31                 <term>m</term>
32                 <listitem>
33                     <para>integer, number of rows.</para>
34                 </listitem>
35             </varlistentry>
36             <varlistentry>
37                 <term>n</term>
38                 <listitem>
39                     <para>integer, number of columns.</para>
40                 </listitem>
41             </varlistentry>
42         </variablelist>
43     </refsection>
44     <refsection>
45         <title>Description</title>
46         <programlisting role=""><![CDATA[ 
47 This functions performs the two-dimension discrete Fourier transform.
48  ]]></programlisting>
49         <para>
50             <literal>y=fft2(x)</literal>y and x have the same size
51         </para>
52         <para>
53             <literal>y=fft2(x,m,n):</literal> If <literal>m</literal> (respectively
54             <literal>n</literal>) is less than the rows number (respectively columns) of
55             <literal>x</literal> then the <literal>x</literal> rows number (resp. columns) is
56             truncated, else if m (resp. <literal>n</literal>) is more than the rows number
57             (resp. columns) of <literal>x</literal> then <literal>x</literal> rows are completed
58             by zero (resp. columns) .
59         </para>
60         <para>
61             if <literal>x</literal> is a matrix then <literal>y</literal> is a matrix, if
62             <literal>x</literal> is a hypermatrix then <literal>y</literal> is a hypermatrix, with
63             the size of the first dimension of <literal>y</literal> is equal to
64             <literal>m</literal>, the size of the second dimension of <literal>y</literal> is
65             equal to <literal>n</literal>, the size of the ith dimension of <literal>y</literal>
66             (for i&gt;2, case hypermatrix) equal to the size of the ith dimension of
67             <literal>x</literal>. (i.e size(y,1)=m, size(y,2)=n and size(y,i)=size(x,i) for
68             i&gt;2)
69         </para>
70     </refsection>
71     <refsection>
72         <title>Examples</title>
73         <programlisting role="example"><![CDATA[ 
74 //Comparison with explicit formula
75 a=[1 2 3 ;4 5 6 ;7 8 9 ;10 11 12]  
76 m=size(a,1)
77 n=size(a,2)
78
79 // fourier transform along the rows
80 for i=1:n
81 a1(:,i)=exp(-2*%i*%pi*(0:m-1)'.*.(0:m-1)/m)*a(:,i) 
82 end
83
84 // fourier transform along the columns
85 for j=1:m
86 a2temp=exp(-2*%i*%pi*(0:n-1)'.*.(0:n-1)/n)*(a1(j,:)).' 
87 a2(j,:)=a2temp.'
88 end
89 norm(a2-fft2(a))
90  ]]></programlisting>
91     </refsection>
92     <refsection role="see also">
93         <title>See Also</title>
94         <simplelist type="inline">
95             <member>
96                 <link linkend="fft">fft</link>
97             </member>
98         </simplelist>
99     </refsection>
100 </refentry>