how to IFFT a spectrum

3 views (last 30 days)
mehrdad bakhshi
mehrdad bakhshi on 27 Dec 2015
Edited: Walter Roberson on 27 Dec 2015
hi fellows
I have a spectrum and I want to transform it to time domain by means of IFFT.but what I got, has different magnitude from its spectrum.
I am not sure if my code is correct or not.I already checked out similar problems but they didn't help me.
please help out
thanks
here is my code:
FRF_Z_Zb is my spectrum which is a vector
Fs = 2048;T = 1/Fs;
num_s = 20397;
df = Fs/(num_s-1)
t = (0:num_s-1)*T;
FRF_Z_Zb_flip = fliplr(FRF_Z_Zb);
FRF_T = [FRF_Z_Zb FRF_Z_Zb_flip];
figure % generated spectrum for ifft
fr2 = [freq freq+max(freq)];
plot(fr2,abs(FRF_T))
xlabel ('Frequency [Hz]')
ylabel ('Amplitude [mm]')
title ('Spectrum2')
s_F = FRF_T * num_s/2 ;
inver = ifft(s_F,'symmetric');
signal = real(inver);
figure % recovered signal
tt=[t t+max(t)];
plot(tt,signal)
title('recovered signal')
then I have to convolute it with another signal

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!