function f = latcmax(h,varargin)
%LATCMAX   Convert a DFILT object to a LATCMAX object.
%   G = LATCMAX(H) returns a LATCMAX filter object G given
%   a maximum-phase FIR DFILT object H.
%
%   G = LATCMAX(H,I) converts the I-th section of H to a
%   LATCMAX filter object.

%   Author(s): R. Losada
%   Copyright 1988-2000 The MathWorks, Inc.
%   $Revision: 1.4 $  $Date: 2000/06/13 21:21:15 $

error(nargchk(1,2,nargin));

tolatcmahndl = latcma(h,'gethndl');


[newsection,connect] = feval(tolatcmahndl,'maxphase',h,varargin{:});
f = latcmax(newsection,connect);

