%Impules and Step response computation using Matlab
%y[n] + 0.7y[n-1] -0.45y[n-2] - 0.6y[n-3] = 0.8x[n] -0.44x[n-1]
%+0.36x[n-2]+0.002x[n-3]

p = [0.8 -0.44 0.36 0.02];
d = [1 0.7 -0.45 -0.6];

[h,m] = impz(p,d,41);
[s,m] = stepz(p,d,41);

stem(m,h);
figure
stem(m,s,'r');