% u21_p08_e205.m

s = tf( "s" );
t = 0:0.02:10;
m = 1; L = 1; g = 9.81;

A = 1;

sys = (1/(m*L^2)) /  (s^2+g/L);
Y1 = step( A*sys, t );
Y2 = impulse( A*sys, t );

Rad2Deg = 57.3;

subplot(211)
plot( t, Rad2Deg*Y1 )
axis([ 0, 10, -20*A, 20*A ])
title("Step Response")

subplot(212)
plot( t, Rad2Deg*Y2 )
axis([ 0, 10, -20*A, 20*A ])
title("Impulse Response")
