% U3C, Pole Locations and Zeros
% 2nd-order system

clear all;
close all;

% 2 poles, 0 zero
% real poles

set_r = [ 1, 5, 10 20 -1 ];

for n = 1:length(set_r)

figure(10+n)

r = set_r(n);
K = 10 * r;

num = [ K ];
den = conv( [ 1 10 ], [ 1 r ]);

G = tf( num, den );

subplot(2, 1, 1)

pzplot( G );
%axis('square')
%axis('equal')
axis( [ -20, 10, -15, 15 ] );
grid on;

% modify size
h = findobj(gca,'type','line');
for i = 1:length(h)
    set(h(i),'markersize',20) %change marker size
    set(h(i), 'linewidth',2)  %change linewidth
end


% time plot

t = 0:0.01:10;

subplot(2, 1, 2 )

step( G, t );
axis( [ 0, 10, -0.5, 1.5 ] );
% modify size

h = findobj(gca,'type','line');
for i = 1:length(h)
    set(h(i),'markersize',20) %change marker size
    set(h(i), 'linewidth',3)  %change linewidth
end


end
