Re: FFT wierdness in WAVE [message #6083 is a reply to message #6080] |
Thu, 28 March 1996 00:00   |
Sergei Senin
Messages: 23 Registered: February 1996
|
Junior Member |
|
|
howie@skeefum.tamu.edu (Matt Howard) wrote:
>
> Can anyone here enlighten me on why the plots produced with the
> following commands are so different?
>
> Other vector lengths which produce this strange behavior are;
>
> 5788 5788+16 5788+48
> 9848 9848-16 9848-32
> and others
>
>> plot,abs(fft(findgen(8395),-1)) - works!
>> plot,abs(fft(findgen(8396),-1)) - fails! Peaks where none should be.
>
> The contents of the vector do not matter. When the vector length is
> 8396 you get a spike on top of the proper spectrum.
>
> Any ideas?
>
>
Now I'm certain that I missed a couple of lectures on FFT when I was studying at
the university :-(
Try this :
;----------------------------------------------------------- -----------
;weird_fft.pro start line
;----------------------------------------------------------- -----------
pro weird_fft
tek_color
out_old=0
for k=0, 10 do begin
if k eq 0 then plot_io ,abs(fft(findgen(8395),-1)), $
xrange=[-1000, 10000], $
color=1, /nodata
ggg=strcompress(string(8395+k))
xyouts, 0.2, 0.2, out_old, /norm, charsize=1.5, color=0
xyouts, 0.2, 0.2, ggg, /norm, charsize=1.5, color=k+1
oplot,abs(fft(findgen(8395+k),-1)), color=k+1
out_old=ggg
endfor
return
end
;----------------------------------------------------------- -----------
;weird_fft.pro stop line
;----------------------------------------------------------- -----------
--
Sergei Senin
ss@ee.port.ac.uk, http://www.ee.port.ac.uk:80/~ss-www/
|
|
|