Why I can not use ( -Inf , Inf) in the Limits of Integral for Inverse Fourier transform of X(w) = 1/(1+j*w) ?
2 次查看(过去 30 天)
显示 更早的评论
% Compute Inverse Fourier transform of X(w)=1/(1+j*w)
Hi , Please I need to peform Inverse Fourier Transform for X(w)=1/(1+j*w) , when I use the limits ( -Inf , Inf) in the integral I get incorrect results for x(t) , I used limits
( -5000 , 5000 I get correct x(t) , so please why I can not use ( -Inf , Inf) ?![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/386418/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/386418/image.jpeg)
Fs=100; % sampling frequency
dT=1/Fs;
t=0:dT:5; % Time vector
L=length(t);
w=linspace(-50,50,L); % Angular frequency range from -50 to 50 rad/sec
f = @(w) (1./(1+j*w).*exp(j*w.*t))/(2*pi); % perform Inverse Fourier Transform Integrand
xt = integral(f,-5000 ,5000,'ArrayValued',true); % perform Numerical integration to compute Inverse Fourier Transform
subplot(211)
plot(t,abs(xt),'LineWidth',1.25) ; grid on ;xlim([ -1 5 ]); ylim([0 1.2]) ; xticks(0:5) ; xlabel('Time in seconds ') ; ylabel('Amplitude') ; title('Inverse Fourier Transform')
ax = gca;
ax.XAxisLocation = 'origin';
ax.YAxisLocation = 'origin';
%% Compare the above result with the analytical solution
%% y(t)=exp(-t)u(t)
yt=exp(-t).*(t>=0);
subplot(212)
plot(t,yt,'LineWidth',1.25) ; grid on ;xlim([ -1 5 ]) ; ylim([0 1.2]) ; xticks(0:5) ; xlabel('Time in seconds ') ; ylabel('Amplitude') ; title('x(t) form analytical solution')
ax = gca;
ax.XAxisLocation = 'origin';
ax.YAxisLocation = 'origin';
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!