% Problem 3.5
t=0:0.1:10;
disp(' ')
% 3.5(b) - Direct programming
A=[0  1; -1 -2]; B=[0; 1]; C=[1 6]; D=0;
subplot(211);
impulse(A,B,C,D,1,t)
grid
title('Direct programming')

% 3.5(b) - Series programming
A=[-1 1; 0 -1]; B=[0; 1]; C=[-5 6]; D=0;
subplot(212)
impulse(A,B,C,D,1,t)
grid
title('Series programming');
