h1=ones(1,10)/10;
ww= -pi:pi/50:pi;
hh=freqz(h1,1,ww);
subplot(2,1,1);plot(abs(hh));
subplot(2,1,2);zplane(h1);
A Bandpass Filter with Real coefficients:
Convolution
>> h1=[1 -1.61 1]
h1 =
h2 =
h3 =
h4 =
>> h=conv(h1,h2)
h=
>> h0=conv(h,h3)
h0 =
>> h6=conv(h0,h4)
h6 =
1.0000 -0.1900 -1.0801 -0.4975 0.7769 0.9712 -0.1848 -1.0837 -0.5120 0.8000
Matlab Code
h1=[1 -0.19 -1.0801 -0.4975 0.7769 0.9712 -0.1848 -
1.0837 -0.5120 0.8]
ww= -pi:pi/50:pi;
hh=freqz(h1,1,ww);
subplot(2,1,1);plot(abs(hh));
subplot(2,1,2);zplane(h1);
A complex Bandpass Filter of 10 point running avg filter
Convolution
>> h1=[1 1.61 1]
h1 =
h2 =
h3 =
h4 =
>> h=conv(h1,h2)
h=
>> hh=conv(h,h3)
hh =
hhh =
Columns 1 through 6
1.0000 0.3010 + 0.9511i -0.7806 + 0.5801i -0.7882 - 0.5631i 0.3001 - 0.9236i 0.9712
Columns 7 through 10