%% Transform Lowpass Filter to IIR Complex 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 complex N-point filter.

[num,den] = iirlp2xc(b,a,[-0.5 0.5],[-0.25 0.25])

%  Compare the magnitude responses of the filters using FVTool.

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

% The target filter has complex coefficients and is indeed a bandpass filter.
% Copyright 2012 The MathWorks, Inc.