%Figure 2.3

gain=30;
c1=nd2sys(1,[1 0.01],gain);
c2=nd2sys([1 1],[1 0.01]); 
c3=nd2sys(1,[1 10]);
L = mmult(c1,c2,c3);

omega=logspace(-3,3,100);
l_f = frsp(L,omega);

line=[3e4 0.001; 3e4 0.01; 3 1; 0.3 10; 0.00003 1000;5 Inf];
br1=[1e-5,0.01; 3e4,0.01; 2 Inf];
br2=[1e-5,1; 3,1; 2 Inf];
br3=[1e-5,10; .3,10; 2 Inf];

clf;
subplot(211)
vplot('liv,lm',l_f,line,'g:',br1,'g:',br2,'g:',br3,'g:')
ylabel('Magnitude')
xlabel('Frequency')
%axis([.001,100,.0001,100000])
text(0.002,5000,'0');text(0.06,100,'-2');text(3,0.1,'-1');text(60,0.001,'-2');

line=[0 0.001;0 0.01;-180 0.01;-180 1;-90 1;-90 10;-180 10;-180 1000;8 Inf];
subplot(212), 
vplot('liv,p',l_f)
ylabel('Phase')
xlabel('Frequency')
axis([.001,1000,-200,0]);hold; %hold on
vplot('liv,d',line,'g:');
hold;                          %hold off
