1
votes

I have applied an FFT to some data that I'd like to process using Matlab. The resulting frequencies are quite noisy, so I have applied a moving average filter to the frequency/amplitude vectors. Now I am interested in getting the time domain data based on this filtered frequency domain data, to be used in a spectrograph later.

To get the frequency/amplitude components I used this code from a Mathworks example:

NFFT=2^nextpow2(L); 
A=fft(a,NFFT)/L; %a is the data
f=Fs/2*linspace(0,1,NFFT/2+1);

and plotted using:

plot(f,2*abs(A(1:NFFT/2+1))

Can you recommend a way of getting the time domain data from the filtered FFT results? Is there an inverse FFT involved?

Thank you very much!

1

1 Answers

2
votes

An IFFT is the inverse of an FFT. If you don't change the frequency data, you should get the same data back from an ifft(fft(x)) from the same library.

If you change the data, and want to get real data back, you have to filter all the imaginary components as well as the real components of the complex FFT results, and make sure that the frequency domain data is still complex conjugate symmetric before doing the IFFT. If you use the magnitudes only, that will throw away the phase information which can greatly distort the result.