%% 1.a
num1 = [2 -5 13.48 -7.78];
den1 = [4 7.2 20 -0.8 8];
num1_fact = factorize(num1);
den1_fact = factorize(den1);

[z, p, k] = tf2zp(num1, den1);

'Zeros 1'
z
'Poles 1'
p
figure(1);zplane(z, p)
%figure(1);zplane(num1, den1)


%% 1.b
num2 = [5 3.5 21.58 -4.6 18];
den2 = [5 15.5 31.7 22.52 4.8];
num2_face = factorize(num2);
den2_fact = factorize(den2);

[z, p, k] = tf2zp(num2, den2);

'Zeros 2'
z
'Poles 2'
p
figure(2);zplane(z, p)
%figure(2);zplane(num2, den2)


%% 2.a

r = [ -4; -7 ];
p = [ -5; 6 ];
k = [ 3 ];

[num3, den3] = residuez(r, p, k);


%% 2.b




%% 3


