%syms n,z;
B=[0.025 -0.07 0.05 -0.02 0]; % Numerator polynomial coefficient;
A=[1 1.5 1.75 1.02 0.4];      % Denominator polynomial coefficient;
dt_sys=tf([0.025 -0.07 0.05 -0.02],[1 1.5 1.75 1.02 0.4],0.02)
[z,p,k]=residuez(B,A);        % finds the residues, poles and direct terms 
                              % of the partial-fraction  
figure(1);
zplane(z,p);                  % Plots the zeros Z and poles P (in column vectors)
z=roots(B);
p=roots(A);
[h,w]=freqz(B,A,50,'whole');    % Frequency response at 256Hz and 1000 sampling frequency.
figure(2);
plot(w,h);
title('Frequency response');
xlabel('Frequency,f');
ylabel('Funtion of w');

[H,T]= impz(B,A,25)           % Computes inpulse response of the filter B/A using 25 samples
figure(3);
plot(T,H);                    % Plots impluse response with repect to time      
title('Impulse response');
xlabel('time,T');
ylabel('Funtion of h');