function [b,a,err,sos,h0] = iirlpnormc(numOrd,denOrd,f,edges,des,varargin)
%IIRLPNORMC Constrained least P-norm optimal IIR filter design.

%   References:
%     [1] A. Antoniou, Digital Filters:  Analysis, Design, and Applications,
%         2nd ed., McGraw-Hill, 1993.

%   Copyright 1999-2023 The MathWorks, Inc.


% Parse the input
s = iirparser(2,numOrd,denOrd,f,edges,des,varargin{:});

% Design the filter
[bs,as,h0,err] = filterdesign.internal.iirlpnormcmex(s.numOrd,s.denOrd,s.edges,s.f,s.des,s.wt,...
    s.maxRadius,s.P,s.density,s.Ho,s.BS,s.AS);

% Compute the transfer function and the sos matrix. h0 is sos gain
[b,a,sos] = computetfandsos(s.numOrd,s.denOrd,bs,as,h0);

