Go back to previous page
Forum URL: http://www.cut-the-knot.org/cgi-bin/dcforum/forumctk.cgi
Forum Name: College math
Topic ID: 562
Message ID: 3
#3, RE: spectral analysis question
Posted by alexb on Mar-11-06 at 03:58 PM
In response to message #2
There is a certain idiosynchrasy in the Matlab implementation which you should learn about. I just looked at their manual at

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/fft.html

It shows an example with two frequencies and random noise, but otherwise, is very much like yours:

==== the last part of the example ====

The power spectrum, a measurement of the power at various frequencies, is

Pyy = Y.* conj(Y) / 512;

Graph the first 257 points (the other 255 points are redundant) on a meaningful frequency axis:

f = 1000*(0:256)/512;
plot(f,Pyy(1:257))
title('Frequency content of y')
xlabel('frequency (Hz)')

=====

Just pay attention to how they execute the plotting. And why half the points are redundant, or what they mean by that