%% Transform Lowpass Filter to IIR Real N-Point Filter
% Design a prototype real IIR lowpass elliptic filter with a gain of about –3 dB at 0.5π rad/sample.

[b,a] = ellip(3,0.1,30,0.409);

% Transform the lowpass filter to an IIR real N-point filter.

[num,den] = iirlp2xn(b,a,[-0.5 0.5],[0.25 0.75]);

% Compare the magnitude responses of the filters using FVTool.

hvft = fvtool(b,a,num,den);
legend(hvft,'Prototype','Target');

% Copyright 2012 The MathWorks, Inc.