How to obtain the Fourier transform of a filtered signal?
2 次查看(过去 30 天)
显示 更早的评论
I am working on a project in which i have to analyze the walking signals of the person. I obtained the signals with the help of an accelerometer. Then I applied low pass butterworth filter of cut-off frequency 0.2Hz and sampling frequency 1Hz. I have obtained the filtered signals in time domain, but i need the signals in frequency domain. From the help of this site I got to know the syntax of fft i.e Y = fft(x) I applied it to my filtered signals and obtained a very unusual result. Please help me in performing fourier transform on the signals. I am attaching my results below.
the fig attached consists of the x component of my filtered signal(i have three columns of readings-x,y and z) and the signal achieved after fft.
回答(2 个)
Adam
2014-8-1
编辑:Adam
2014-8-1
fft gives a complex result. That is what you are seeing in that figure - real vs imaginary on the x and y axes. You can view the spectrum using the abs function.
e.g.
y = fft(x, nFFT);
plot( 2*abs(Y(1:nFFT/2+1) ) );
Obviously you can also calculate the frequencies to plot those on the x-axis. The Matlab help page for fft gives an example of this.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!