%  Example 5.2.  Nyquist plot generation:  Zero on the imaginary axis.
clear
%  Define the loop transfer fucntion.
nu=2;
de=[1 1 0];
%  Generate and plot the nyquist locus.
set(0,'DefaultAxesFontName','times')
set(0,'DefaultAxesFontSize',16)
set(0,'DefaultTextFontName','times')
figure(1)
clf
[re,im]=nyquist(nu,de);
plot(re,im,'r-',re,-im,'r-',-1,0,'r+',re(27),im(27),...
   'r^',re(27),-im(27),'r^')
xlabel('Real axis')
ylabel('Imaginary axis')
axis([-10 10 -10 10])
axis('square')
grid
%  Add large radius circle resulting from detour around the pole 
%  at the origin. 
hold on
fact=1.12;
theta=-fact*pi/2:.03:0;
plot(10.2*cos(theta),10.2*sin(theta),'r-')
theta=0:.03:fact*pi/2;
plot(10.2*cos(theta),10.2*sin(theta),'r-')
