%
% Example 3.18 and Figures 3.10, 3.11, and 3.12
%
num=[1 1]
den=[1 3 2 1]
w=0:0.01:4;
H=freqs(num,den,w);
magH=abs(H);
% figure 3.10
figure (1)
plot(w,magH)
xlabel('angular frequency in [rad/s]')
ylabel('magnitude spectrum')
grid
print -deps fig3_10.eps
% figure 3.11
figure (2)
semilogx(w,magH)
xlabel('log(w)')
ylabel('magnitude spectrum')
grid
print -deps fig3_11.eps
% figure 3.12
w=0:0.1:10;
H=freqs(num,den,w);
phaseH=angle(H)*180/pi;
figure (3)
semilogx(w,phaseH)
xlabel('log(w)')
ylabel('phase spectrum')
grid
print -deps fig3_12.eps
