comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: FFT help
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: FFT help [message #41616] Fri, 05 November 2004 10:47 Go to previous message
R.G.Stockwell is currently offline  R.G.Stockwell
Messages: 163
Registered: October 2004
Senior Member
"IDLmastertobe" <shi_lee@hotmail.com> wrote in message
news:26d23fcf09dce26228fc67cf81ec832f@localhost.talkaboutpro gramming.com...
> Hey, I am experiencing problem using fft function. Since FFT function
> provides the fourier transform of a certain input, for example,
> 8*cos(!PI*x/6), I would expect an amplitude of 4 at 2 shifted frequencies,
> namely -!PI/6 and PI/6. However after I recieved data from the FFT, I
> recieved some amplitudes close to 2 at some random locations, can anyone
> explain to me why it happened? Thanks for your time.

You quite probably did not sample the frequencies exactly at -!pi/6.
The other peaks are probably sidelobes.
I suggest reading several books about signal processing and spectral
analysis.
A great book to start with is Brighams "FFT and its applications"


Also, check out the following code

freq = 11
len = 100
amp = 8
t = findgen(len)
signal = amp*cos(2*!pi*freq*t/len)

ampspe = abs(fft(signal))
You will find your peak = 4 for the frequencies at freq/len.

Note that positive freqs come first in the fft, followed by the negative
freqs.

Cheers,
bob
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: About Image Formats
Next Topic: Re: IDL PET/CT Viewer and Analysis package

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:02:13 PDT 2025

Total time taken to generate the page: 0.00434 seconds