IFFT of analytic function

2 ビュー (過去 30 日間)
Michael
Michael 2015 年 5 月 19 日
I'm trying to inverse Fourier transform 10/(.1+is) using ifft. The shape is correct but the amplitude is always off. My code is below:
N=128; %Number of points in frequency space
w=linspace(0,10,N); %grid in frequency space
f=10./(.1+j*w); %function values in frequency space
ws=w(2)-w(1); %increment in freq space
ts=2*pi/(ws); %increment in time space
F=N/(2*pi)*abs(ifft(f)); %Function in time space, where prefactor needed due to ifft settings.
Fp=F(1:N/2+1)*ws; %Take half of function and scale
T=ts*(0:N/2)/N; %grid in time space
N2=length(T);
Fa=10*exp(-1*T); %analytic function
plot(T,abs(Fa),'*',T,abs(Fp),'+'); %comparison

回答 (0 件)

カテゴリ

Help Center および File ExchangeDiscrete Fourier and Cosine Transforms についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by