clear x1 = [2,3,4]; x2 = [3,4,5,6]; x3 = conv(x1,x2) [x,r] = deconv(x3,x1) b = [0,1]; a = [3,-4,1]; [R,p,C] = residuez(b,a) [b,a] = residuez(R,p,C) stop = 1, pause b = 1; a = poly([0.9, 0.9, -0.9]); [R,p,C] = residuez(b,a) b = [1,0]; a = [1,-0.9]; zplane(b,a) [H,w] = freqz(b,a,100); figure(2) subplot(2,1,1) plot(w,abs(H)) grid on ylabel('Magnitude Response') subplot(2,1,2) plot(w,angle(H)) grid on [H,w] = freqz(b,a,200,'whole'); figure(3) subplot(2,1,1) plot(w,abs(H)) grid on ylabel('Magnitude Response') subplot(2,1,2) plot(w,angle(H)) grid on ylabel('Phase') stop = 2, pause b = [1,0,0,0,0,0,0,0,-1]; a = 1; figure(4) zplane(b,a) [H,w] = freqz(b,a,200,'whole'); figure(5) subplot(2,1,1) plot(w,abs(H)) grid on ylabel('Magnitude Response') subplot(2,1,2) plot(w,angle(H)) grid on ylabel('Phase') stop = 3, pause b = 1; a = [1,0,0,0,0,0,0,0,-.9]; figure(6) zplane(b,a) [H,w] = freqz(b,a,200,'whole'); figure(7) subplot(2,1,1) plot(w,abs(H)) grid on ylabel('Magnitude Response') subplot(2,1,2) plot(w,angle(H)) grid on ylabel('Phase')