FFT of a time-valued signal, then IFFT doesn't return the same signal
2 ビュー (過去 30 日間)
古いコメントを表示
Hello everybody,
I've got a problem using matlab fft/ifft: I have a .dat file from which I read the first two columns (data).
I make the fft of the signal and then the ifft to see if they correspond. They do not. Does anyone know why?
My code:
fs=200000;
time=0:1/fs:2-1/fs;
data=load(['S09H4R2.dat']);
Ffrapp=2*fft(data(:,1))./length(data(:,1));
Fsarf=2*fft(data(:,2))./length(data(:,2));
antiFfrapp=ifft(FFTfrappF./2.*length(data(:,1)),'symmetric');
antiFsarf=ifft(FFTfrappF./2.*length(data(:,2)),'symmetric');
figure
plot(time,data(:,1),'b');hold on;
plot(time,data(:,2),'c');
plot(time,antiFfrapp,'r -s');
plot(time,antiFsarf,'g -*');
xlim([0 0.02]);
THANK YOU in advance
0 件のコメント
採用された回答
Peng Li
2020 年 3 月 28 日
fs=200000;
time=0:1/fs:2-1/fs;
data=load(['S09H4R2.dat']);
Ffrapp=2*fft(data(:,1))./length(data(:,1));
Fsarf=2*fft(data(:,2))./length(data(:,2));
antiFfrapp=ifft(FFTfrappF./2.*length(data(:,1)),'symmetric'); % what is your FFTfrappF? you were using Ffrapp in above lines.
antiFsarf=ifft(FFTfrappF./2.*length(data(:,2)),'symmetric');
figure
plot(time,data(:,1),'b');hold on;
plot(time,data(:,2),'c');
plot(time,antiFfrapp,'r -s');
plot(time,antiFsarf,'g -*');
xlim([0 0.02]);
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Transforms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!