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

clear all;
%close all;
clf
 
w=logspace(-2,3,100);

num = 1;
den = [1 2 1];

figure(1)
rlocus( tf(num, den ) )
set(findall(gcf,'type','line'),'linewidth',2);
%grid
axis([-3 3 -3 3])

figure(2)
bode( num, den )

set(findall(gcf,'type','line'),'linewidth',2);
grid

figure(3)
[re,im] = nyquist(num,den,w);
hold on

plot(re,im,re,-im,'LineWidth',2);

axis([-0.5 1.5 -1 1])

set(findall(gcf,'type','line'),'linewidth',2);

grid on;
axis equal
xlabel('Re(G(s))');
ylabel('Im(G(s))');
title('Nyquist plot');
