transmission zeros and poles

8 views (last 30 days)
Kamil Tkacz
Kamil Tkacz on 4 Feb 2015
Hi i have a problem with my matlab codes. I would be very gratefull if someone show me where i did mistake. Matlab shows error:
"Error using horzcat
Dimensions of matrices being concatenated are not consistent.
Error in bvcbvcbc (line 15)
x=[zeros(l),1]"
and my matlab code:
clear all;
close all;
clc;
w0=pi/4;
N=15;
z=exp(1i*w0);
n=[-N:1:N];
z0=0.9*exp(1i*w0);
p = poly([z0,conj(z0)])
[H,w]=freqz(1,p,1e3);
figure()
plot(w/pi,abs(H))
grid on
l=length(n)-1;
x=[zeros(l),1]
imp=filter(p,x,[H,w]);
plot(n,imp)
plot should looks like this:

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by