How can I draw a fft transform?
8 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I encounter the problem of transforming a shape from the time domain to the frequency domain.

I used the following commands to convert Fourier.
n1=8;
n2=72;
nt=25501;
dt=1.176470588235294e-13;
F=zeros(n1+n2+2,nt);
F1=F(n1+n2,:);
F2 = fftshift(fft(F1));
f=linspace(-10,10,length(F2));
figure(1);
plot(f, 10*log10(abs(F2)))
Please do not doubt the values entered such as 'nt' and 'dt' because all the shapes obtained in the time domain are correct and the only problem is in converting the frequency.
Let me know please.
Thank you.
0 件のコメント
回答 (1 件)
Eric
2021 年 9 月 29 日
I think your "actual" plot looks correct, honestly. It is roughly the same shape as the "desired" plot, and my guess is that zooming in to the +/-0.2 THz region will probably display the five peaks shown in the "desired" plot's inset. I think I can count these five peaks in your "actual" plot even though the quality of the image is not great.
The one thing you may be missing is the application of a window (hann, hamming, etc) prior to the fft. This was probably done with the "desired" plot and is commonly done in frequency analysis.
As for your example code, it's only zeros, so there's no way for me to verify that your data is actually correct.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Multirate Signal Processing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!