EE 23352 Programming Applications in signals and systems
Lab 4 : Signal Spectra using Symbolic Math
Rahaf awadallah
20170070
1. (20 points) Consider the signal x(t) = 500e −500tu(t). (a) Write a MATLAB code to find the
Fourier transform of the signal x(t).
syms t w
X=fourier('500*exp(-1*500*t)*heaviside(t) ',t,w)
(b) Write down the expression of X(ω) obtained in MATLAB part (a).
As shown after running the above code X(w)=500/(500+jw)
© Write a MATLAB code to generate and plot X(ω) magnitude and phase for ω ∈ (−2000, 2000).
syms t w
X=fourier('500*exp(-1*500*t)*heaviside(t) ',t,w);
w=-2000:0.2:2000;
X=subs(X,w);
subplot(2,1,1),plot(w,abs(X));xlabel('|X(w)|');ylabel('w');title('figure1');
subplot(2,1,2),plot(w,angle(X));xlabel('<X(w)');ylabel('w');title('figure2');