Why I can not use ( -Inf , Inf) in the Limits of Integral for Inverse Fourier transform of X(w) = 1/(1+j*w) ?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
% 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) ?
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 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Discrete Fourier and Cosine Transforms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!