% Problem 4.2 - Transfer functions

A1=[0 1 0; 0 0 1; 0 0 0];
A2=[0 1 0; 0 0 0; 0 0 0];
A3=[0 0 0; 0 0 0; 0 0 0];
B=[1; 1; 1];
C=[1 1 1];
D=0;
EPS=1.e-12;

% 4.1(a)
[num1,den1]=ss2tf(A1,B,C,D,1);
disp(' ')
disp('G1(s)')
printsys(num1,den1,'s')

% 4.1(b)
[num2,den2]=ss2tf(A2,B,C,D,1);
disp(' ')
disp('G2(s)')
printsys(num2,den2,'s')

% 4.1(c)
[num3,den3]=ss2tf(A3,B,C,D,1);
for i=1:length(num3),
    if num3(i)<EPS
       num3(i)=0;
    end
end
disp(' ')
disp('G3(s)')
printsys(num3,den3,'s')