clear all; close all;
T1 = 1;
T2 = 20;
T3 = 50;
num1 = [ 0 1 ];
den1 = [ T1 1 ];
num2 = [ 0 T2 ];
den2 = [ T2 1 ];
num3 = [ 0 T3 ];
den3 = [ T3 1 ];
sys1 = tf( num1, den1 );
sys2 = tf( num2, den2 );
sys3 = tf( num3, den3 );
t = 0:0.01:50;
[ 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');
yticks([0 0.2 0.4 0.6 0.8 1]);
grid;
xlabel('time t [s]');
ylabel('y(t) = K/T e^{-t/T}');
legend('T = 1','T = 20','T = 50');