% Fig. 6.10   Feedback Control of Dynamic Systems, 8e 
%             Franklin, Powell, Emami
%

clear all;
%close all;
clf

num=10;
den=conv([1 0],[1 0.4 4]);
w=logspace(-1,2,100);
[m,p]=bode(num,den,w);

figure(1)
subplot(2,1,1)

loglog(w,m,'LineWidth',2);
grid on;
xlabel('\omega (rad/sec)');
ylabel('Magnitude');
title('Bode plot for a TF with a complex pole :(a) magnitude');
%pause;
%figure(2)

subplot(2,1,2)

semilogx(w,p,'LineWidth',2);
grid on;
xlabel('\omega (rad/sec)');
ylabel('Phase');
title('(b) phase');
figure(1)