clear all; close all;
K = 1;
omegan = 1;
zeta1 = 0.1;
zeta2 = 1.0;
zeta3 = 2.0;
num1 = [ 0 0 K*omegan^2 ];
den1 = [ 1 2*zeta1*omegan omegan^2 ];
num2 = [ 0 0 K*omegan^2 ];
den2 = [ 1 2*zeta2*omegan omegan^2 ];
num3 = [ 0 0 K*omegan^2 ];
den3 = [ 1 2*zeta3*omegan omegan^2 ];
sys1 = tf( num1, den1 );
sys2 = tf( num2, den2 );
sys3 = tf( num3, den3 );
t = 0:0.01:20;
[ y1, t1 ] = impulse( sys1, t );
[ y2, t2 ] = impulse( sys2, t );
[ y3, t3 ] = impulse( sys3, t );
plot(t1,y1,'-b',t2,y2,'-g',t3,y3,'-r');
xlim([0,20])
ylim([-0.8,1.0])
xticks([0 5 10 15 20])
yticks([-0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0])
grid;
xlabel('time t [s]');
ylabel('y(t)')
legend('ζ = 0.1','ζ = 1.0','ζ = 2.0');