%% Wideband highpass design using an interpolation factor of 6
% This example shows how to use ifir to design a wideband highpass filter.

[h,g,d]=ifir(6,'high',[.12 .14],[.001 .01]);
H = dsp.FIRFilter('Numerator',h); G = dsp.FIRFilter('Numerator',g);
b1 = cascade(H,G);                 % Branch 1
b2 = dsp.FIRFilter('Numerator',d); % Branch 2
Hoverall = freqz(b1) + freqz(b2); % Overall wideband highpass
plot(linspace(0,1,length(Hoverall)),20*log10(abs(Hoverall)))
xlabel('Normalized frequency (\times \pi) rad/s')
ylabel('Magnitude (dB)')
title('Overall Filter');
grid on

% Copyright 2012 The MathWorks, Inc.