%% Power Complementary IIR Filter
% Calaculate the coefficients of the power complementary IIR filter.

[b,a]=cheby1(10,.5,.4);
[bp,ap]=iirpowcomp(b,a);

% Compare the magnitude responses of the filters using FVTool.

fvtool(b,a,bp,ap,'MagnitudeDisplay','Magnitude squared');
legend('Original Filter','Power Complementary Version');

% Copyright 2012 The MathWorks, Inc.