从频域转换到时域(IFFT)

时间:2015-12-23 19:32:59

标签: matlab fft ifft

我有一个FRF,我想将其从频域转换到时域。 这是我的代码,我怀疑它是否正确。

FRF_Z_Zb = FRF_X0_Zb(1,:);

%% IFFT  %%

FRF_Y_Zb = FRF_Z_Zb;

FRF_Z_Zb_flip = fliplr(FRF_Z_Zb);
FRF_T = [FRF_Z_Zb FRF_Z_Zb_flip];

figure(1)  % generated spectrum for ifft
fr2 = [freq freq+max(freq)];
plot(fr2,abs(FRF_T))
xlabel ('Frequency [Hz]')
ylabel ('Amplitude [mm]')
title ('Spectrum2')


num_s = length(freq)*2;
s_F = FRF_T * num_s/2 ;

inver = ifft(s_F,'symmetric');
signal = real(inver);

figure(2) % recovered signal
Fs = 20396;% num_s*df;
T=1/Fs;
t = (0:num_s-1)*T;
plot(t(1:20396),signal(1:20396))
title('recovered signal')

0 个答案:

没有答案