镜像滤波器
原型滤波器 h[k]
镜像滤波器 (-1)^k * h[k]。 镜面对称
补码滤波器 与原型滤波器构成全通。 hcomp(k) = -h[k], hcomp(L+1) = 1 - h(k), k=2*L+1
Num = [ 1/5, 1/5, 1/5, 1/5, 1/5];
N = 2
part_N = 2*N +1;
Num_temp = Num(1:part_N);
figure(3)
temp1 = abs(freqz(Num_temp, 1, 512, fs));
mir_num = Num_temp;
mir_num(2:2:end) = mir_num(2:2:end) *(-1);
temp2 = abs(freqz(mir_num, 1, 512, fs));
bu_num = -Num_temp;%127 63*2 +1 L = 63
bu_num(N+1) = 1 + bu_num(N+1);
temp3 = abs(freqz(bu_num, 1, 512, fs));
x = 1:512;
plot(x, temp1, x, temp2, x, temp3);
legend('原型滤波器','镜像FIR滤波器','补码FIR滤波器');
figure(2)
plot(x, temp1 + temp3);