%% Design a Lowpass and Highpass Filter Using firlpnorm
% Lowpass filter with a peak of 1.4 in the passband.

b = firlpnorm(22,[0 .15 .4 .5 1],[0 .4 .5 1],[1 1.4 1 0 0],...
[1 1 1 2 2]);
fvtool(b)

% The resulting filter is lowpass, with the desired 1.4 peak in the passband (notice the 1.4 specified in vector a).
%
% Highpass minimum-phase filter optimized for the 4-norm.

b = firlpnorm(44,[0 .4 .45 1],[0 .4 .45 1],[0 0 1 1],[5 1 1 1],...
[2 4],'minphase');
fvtool(b)

% This is a minimum-phase, highpass filter.
%
% The zero-pole plot shows the minimum phase nature more clearly.

fvtool(b,'polezero')

% Copyright 2012 The MathWorks, Inc.