% u22 p26

clear all; close all;

den=[1 1.4 1];
num=[1];

sysC = tf( num, den )

% h = 0.4, 0.2, 0.1, 1

figure(1)
bode( sysC )
%axis( [-3 2 -2 2])
set(findall(gcf,'type','line'),'linewidth',3);

hold on

figure(2)
nyquist( sysC )
%axis( [-3 2 -2 2])
set(findall(gcf,'type','line'),'linewidth',3);

hold on

figure(3)
rlocus(sysC)
set(findall(gcf,'type','line'),'linewidth',3);
hold on

h = 0.4;
sysD = c2d( sysC, h )

figure(1)
bode( sysD )
%axis( [-3 2 -2 2])
set(findall(gcf,'type','line'),'linewidth',3);

figure(2)
nyquist( sysD )
%axis( [-3 2 -2 2])
set(findall(gcf,'type','line'),'linewidth',3);

figure(3)
rlocus(sysD)
set(findall(gcf,'type','line'),'linewidth',3);
hold on


h = 0.2;
sysD = c2d( sysC, h )

figure(1)
bode( sysD )
%axis( [-3 2 -2 2])
set(findall(gcf,'type','line'),'linewidth',3);

figure(2)
nyquist( sysD )
%axis( [-3 2 -2 2])
set(findall(gcf,'type','line'),'linewidth',3);

figure(3)
rlocus(sysD)
set(findall(gcf,'type','line'),'linewidth',3);


h = 0.1;
sysD = c2d( sysC, h )

figure(1)
bode( sysD )
%axis( [-3 2 -2 2])
set(findall(gcf,'type','line'),'linewidth',3);

figure(2)
nyquist( sysD )
%axis( [-3 2 -2 2])
set(findall(gcf,'type','line'),'linewidth',3);

figure(3)
rlocus(sysD)
set(findall(gcf,'type','line'),'linewidth',3);


h = 1;
sysD = c2d( sysC, h )

figure(1)
bode( sysD )
%axis( [-3 2 -2 2])
set(findall(gcf,'type','line'),'linewidth',3);


figure(2)
nyquist( sysD )
%axis( [-3 2 -2 2])
set(findall(gcf,'type','line'),'linewidth',3);

figure(3)
rlocus(sysD)
set(findall(gcf,'type','line'),'linewidth',3);


h = 4;
sysD = c2d( sysC, h )

figure(1)
bode( sysD )
%axis( [-3 2 -2 2])
set(findall(gcf,'type','line'),'linewidth',3);


figure(2)
nyquist( sysD )
axis( [-2 2 -2 2])
set(findall(gcf,'type','line'),'linewidth',3);

figure(3)
rlocus(sysD)
set(findall(gcf,'type','line'),'linewidth',3);



h = 0.01;
sysD = c2d( sysC, h )

figure(1)
bode( sysD )
%axis( [-3 2 -2 2])
set(findall(gcf,'type','line'),'linewidth',3);


figure(2)
nyquist( sysD )
axis( [-2 2 -2 2])
set(findall(gcf,'type','line'),'linewidth',3);

figure(3)
rlocus(sysD)
set(findall(gcf,'type','line'),'linewidth',3);


