Update fftw module : remove pushfftw_plan/freefftw_plan, fftw_inplace (always inplace...
[scilab.git] / scilab / modules / fftw / help / en_US / fftw.xml
1 <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
2 <!DOCTYPE MAN SYSTEM "../../../../modules/helptools/help.dtd">
3 <MAN>
4   <LANGUAGE>eng</LANGUAGE>
5   <TITLE>fftw</TITLE>
6   <TYPE>Scilab Function</TYPE>
7   <DATE>October 2006</DATE>
8   <SHORT_DESCRIPTION name="fftw">fast fourier transform that use fftw library</SHORT_DESCRIPTION>
9   <CALLING_SEQUENCE>
10     <CALLING_SEQUENCE_ITEM>[y]=fftw(x)</CALLING_SEQUENCE_ITEM>
11     <CALLING_SEQUENCE_ITEM>[y]=fftw(x,sign)</CALLING_SEQUENCE_ITEM>
12     <CALLING_SEQUENCE_ITEM>[y]=fftw(x,sign,dim,incr)</CALLING_SEQUENCE_ITEM>
13     <CALLING_SEQUENCE_ITEM>[y]=fftw(x,sign,[dim1 dim2 ...dimN],[incr1 incr2 ...incrN])</CALLING_SEQUENCE_ITEM>
14   </CALLING_SEQUENCE>
15   <PARAM>
16     <PARAM_INDENT>
17       <PARAM_ITEM>
18         <PARAM_NAME>y,x</PARAM_NAME>
19         <PARAM_DESCRIPTION>
20           <SP>: matrix/vector of real/complex data. Input/output data to be transformed.</SP>
21         </PARAM_DESCRIPTION>
22       </PARAM_ITEM>
23       <PARAM_ITEM>
24         <PARAM_NAME>sign</PARAM_NAME>
25         <PARAM_DESCRIPTION>
26           <SP>: Integer. 1 or -1. Set direct or inverse transform.</SP>
27         </PARAM_DESCRIPTION>
28       </PARAM_ITEM>
29       <PARAM_ITEM>
30         <PARAM_NAME>dim</PARAM_NAME>
31         <PARAM_DESCRIPTION>
32           <SP>: integer. Set the dimension (the length) of the transform.</SP>
33         </PARAM_DESCRIPTION>
34       </PARAM_ITEM>
35       <PARAM_ITEM>
36         <PARAM_NAME>incr</PARAM_NAME>
37         <PARAM_DESCRIPTION>
38           <SP>: integer. Set the stride (the span) of the transform.</SP>
39         </PARAM_DESCRIPTION>
40       </PARAM_ITEM>
41     </PARAM_INDENT>
42   </PARAM>
43   <DESCRIPTION>
44     <P>
45     This function realizes direct/inverse Discrete Fourier Transform (DFT) with the help of the FFTW library.
46     </P>
47     <P>
48     One can compute vector, 2D, M-D transform with this function.
49     </P>
50     <P>
51     For more details of fftw syntax see <A href='fft.htm'><VERB>fft</VERB></A> scilab function.
52     </P>
53     <P>
54     For more details about FFTW library see FFTW Web site :<A href='http://www.fftw.org'><VERB> http://www.fftw.org </VERB>.</A>
55     </P>
56     <P>
57     <SP>
58      Remark : fftw function automaticaly stores his last parameters in memory to re-use it in a second time.
59      </SP>
60      <SP>
61      This results on a time computation improvement when consecutives calls (with same parameters) are used.
62     </SP>
63     </P>
64   </DESCRIPTION>
65   <EXAMPLE>
66   <![CDATA[
67   //simple vector direct transform
68   a = rand(50,1)+%i*rand(50,1);
69   y = fftw(a);
70   y = fftw(a,-1);
71   //inverse transform
72   b = fftw(y,1);
73
74   //2D transform
75   a = rand(512,512)+%i*rand(512,512);
76   y = fftw(a);
77
78   //M-D transform -old calling sequence-
79   a = rand(120,1);
80   y = a;
81   dim=[5 6 4];incr=[1 5 30];
82   for i=1:3
83     y = fftw(y,-1,dim(i),incr(i));
84   end
85
86   //M-D transform -new calling sequence-
87   //More efficient than old
88   y = fftw(a,-1,[5 6 4],[1 5 30]);
89   b = fftw(y,1,[5 6 4],[1 5 30]);
90   ]]>
91   </EXAMPLE>
92   <SEE_ALSO>
93     <SEE_ALSO_ITEM>
94       <A href='fftw_flags.htm'><VERB>fftw_flags</VERB></A>
95       <A href='get_fftw_wisdom.htm'><VERB>get_fftw_wisdom</VERB></A>
96       <A href='set_fftw_wisdom.htm'><VERB>set_fftw_wisdom</VERB></A>
97       <A href='fftw_forget_wisdom.htm'><VERB>fftw_forget_wisdom</VERB></A>
98     </SEE_ALSO_ITEM>
99   </SEE_ALSO>
100
101   <BIBLIO>
102     <P>
103     Matteo Frigo and Steven G. Johnson, &quot;FFTW Manual fo version 3.1.2&quot; June 2006. Available : http://www.fftw.org
104     </P>
105   </BIBLIO>
106
107 </MAN>