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 CenterFile Exchange에서 Discrete 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