File: fft.htm

package info (click to toggle)
extrema 4.4.4.dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 19,416 kB
  • ctags: 6,689
  • sloc: cpp: 88,991; sh: 8,229; makefile: 480
file content (48 lines) | stat: -rw-r--r-- 2,020 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<HTML>
<HEAD>
<TITLE>Fast Fourier transform</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF" fgcolor="#000000">

<P><font size="+3" color="green"><B>Fast Fourier transform</B></font></P>
<P>
<TABLE border="1" cols="2" frame="box" rules="all" width="572">
<TR>
<TD width="15%" valign="top"><B>Syntax</B>:</TD>
<TD width="85%"><CODE>
m = FFT(y)<br />
m = FFT(y,'AMP&PHASE')<br />
m = FFT(y,'COS&SIN')</CODE>
</TD></TR>
</table></p>
<p>
 The <CODE>FFT</CODE> function calculates the
 discrete fast Fourier transform of the input variable,
 <CODE>y</CODE>. By default, <CODE>FFT</CODE> returns the amplitudes and
 the phases, where the phases are in degrees. If the
 <CODE>COS&SIN</CODE> keyword is used, <CODE>FFT</CODE> returns the Fourier
 coefficients.</p>
<p>
 Note that the reason that the amplitudes and phases are returned by
 default is historical. Actually, the Fourier coefficients, that is, the
 cosine and sine coefficients, are calculated and the amplitudes and
 phases are just derived from them, as described below. It is a
 simple matter for the user to request the cosine and sine coefficients,
 and then to calculate the amplitudes and phases him/herself.</p>
<p>
 Suppose that the length of the input vector is <code>2N</code>. The
 output of this function is a matrix with <code>N+1</code> rows and 2
 columns. The first column contains the amplitudes (or the cosine
 coefficients), and the second column contains the phases (or the sine
 coefficients).</p>
<p>
 The <CODE><a href="ifft.htm">IFFT</a></CODE> function
 calculates the inverse fast Fourier transform.</p>
<p>
 <a href="fftS01.htm"><font size="+1" color="olive">Fourier coefficients</font></a><br />
 <a href="fftS02.htm"><font size="+1" color="olive">Discrete Fourier series</font></a><br />
 <a href="fftS03.htm"><font size="+1" color="olive">Restrictions</font></a><br />
 <a href="fftS04.htm"><font size="+1" color="olive">Prime factors</font></a><br />
 <a href="fftS05.htm"><font size="+1" color="olive">Example</font></a></p>
</BODY>
</HTML>