% Fig. 6.2   Feedback Control of Dynamic Systems, 8e 
%             Franklin, Powell, Emami
%
 
clear all;
%close all;

clf

s=tf('s');

sysD=(s+1)/(s/10+1);
w=logspace(-1,2);
[mag,ph]=bode(sysD,w);

subplot(2,1,1)

loglog(w,squeeze(mag),'LineWidth',2);

grid on;
axis([.1 100 1 10])
title('Fig. 6.2 (a) Magnitude');
xlabel('\omega (rad/sec)');
ylabel('Magnitude');

subplot(2,1,2)

semilogx(w,squeeze(ph),'LineWidth',2);

grid on;
axis([.1 100 0 60])
title('(b) Phase');
ylabel('\phi (deg)');
xlabel('\omega (rad/sec)')
