% U31, p. 9
% 2nd-order system

s = tf( 's' )
wn = 1;
zeta = 0.9;

sysH = wn^2/( s^2 + 2*zeta*wn*s + wn^2 )

t = 0:0.01:50;
y1 = step( sysH, t );
y2 = impulse( sysH, t );

figure(1)

subplot(2,1,1)
plot( t, y1 )
grid
axis( [ 0, 50, -0.1, 2] )
title('step');

hold on;

subplot(2,1,2)
plot( t, y2 )
grid
axis( [ 0, 50, -2, 2] )
title('impluse');

hold on;


