IFFT of analytic function
1 view (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Transforms in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!