File: fft.htm

package info (click to toggle)
extrema 4.3.6-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 19,212 kB
  • ctags: 6,452
  • sloc: cpp: 86,428; sh: 8,229; makefile: 814
file content (34 lines) | stat: -rw-r--r-- 839 bytes parent folder | download
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
<HTML>
<HEAD>
<TITLE>Analyze data using FFT</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">

<P>
 Read sunspot data s from file <a href="sunspot.dat">sunspot.dat</a>,
 calculate the FFT of s, and graph the amplitudes and phases<br />
<P>
 <font color="blue"><pre>
 read sunspot.dat year s
 window 5
 set xlabel 'year'
 set ylabel 's'
 graph year s
 m = fft(s)
 window 6
 set ylabel 'amplitudes'
 graph m[*,2]
 window 7
 set ylabel 'phases'
 graph m[*,1]
 </pre></font></P>
<P>
 <img src="fft.gif"></p>
<P>
 <a href="defineplotfunction.htm"><img src="../shadow_left.gif">&nbsp;
 <font size="+1" color="olive">Define and plot a function</font></a><br />
 <a href="contourdensity.htm"><img src="../shadow_right.gif">&nbsp;
 <font size="+1" color="olive">Display array data as contours and density plot</font></a>
</P>
</BODY>
</HTML>