DTFT Computation Using MATLAB Example- Plot magnitude and phase of the DTFT 0.008-0.033e-0+0.05e-J20 0.033e-30+0.008-/4c X¥(e/0)= 1+2.37e-0+27e-J20 +1.6e +0.41e j40 Copyright C 2001, S K Mitra
Copyright © 2001, S. K. Mitra 11 DTFT Computation Using MATLAB • Example - Plot magnitude and phase of the DTFT − − − − − − − − + + + + − + − + = 3 4 2 3 4 2 1.6 0.41 1 2.37 2.7 0.033 0.008 0.008 0.033 0.05 ( ) j j j j j j j j j e e e e e e e e X e
DTFT Computation Using MATLAB >>num=[0.0080.0330.050.0330008] >>den=[12.372.71.60.41]; >>om=[o:pi/256:pj; >>H=freqz(num, den, om) >> figure(1) > plot(om/pi, abs(H), LineWidth, 2) > Xlabel( omega/pi) > ylabel( H(e nomega]l) > title(Magnitude Response") >>grid on Copyright C 2001, S K Mitra
Copyright © 2001, S. K. Mitra 12 DTFT Computation Using MATLAB >> num=[0.008 -0.033 0.05 -0.033 0.008]; >> den=[1 2.37 2.7 1.6 0.41]; >> om=[0:pi/256:pi]; >> H=freqz(num,den,om); >> figure(1) >> plot(om/pi,abs(H),'LineWidth',2) >> xlabel('\omega/\pi') >> ylabel('|H(e^{j\omega})|') >> title('Magnitude Response') >>grid on
DTFT Computation Using MATLAB Magnitude Response 09 08 0.7 0.5 一一一一一 0.3 00.1020.3040.50.6 70.80.9 0/r Copyright C 2001, S K Mitra
Copyright © 2001, S. K. Mitra 13 DTFT Computation Using MATLAB
DTFT Computation Using MATLAB > figure(2) > plot(om/pi, angle(H), Line Width, 2) >> Xlabel(omega/pi) > ylabel(phase((e omega) >> title(Phase Response) > gidon 14 Copyright C 2001, S K Mitra
Copyright © 2001, S. K. Mitra 14 DTFT Computation Using MATLAB >> figure(2) >> plot(om/pi,angle(H),'LineWidth',2) >> xlabel('\omega/\pi') >> ylabel('phase(H(e^{j\omega}))') >> title('Phase Response') >> grid on
DTFT Computation Using MATLAB Phase Response 2F----4----4-- 101 2}----1------------1-----1----1- 00.1020.30.4 50.6 70.80.9 0{π 15 Copyright C 2001, S K Mitra
Copyright © 2001, S. K. Mitra 15 DTFT Computation Using MATLAB