function [k1,k2,beta]=tf2cl(b,a)
%TF2CL Transfer function to coupled allpass lattice conversion.

% Reference:[1] P.P. Vaidyanathan, ROBUST DIGITAL FILTER STRUCTURES, in
%               HANDBOOK FOR DIGITAL SIGNAL PROCESSING. S.K. Mitra and J.F.            
%               Kaiser Eds. Wiley-Interscience, N.Y., 1993, Chapter 7.
%           [2] S. K. Mitra, DIGITAL SIGNAL PROCESSING, A Computer
%               Based Approach, McGraw-Hill, N.Y., 1998, Chapter 6.
%

%   Copyright 1999-2016 The MathWorks, Inc.

narginchk(2,2);

try
    [d1,d2,beta] = tf2ca(b,a);
catch ME
    throw(ME);
end

% We obtain the K's as if the filters were all-pole filters
k1 = tf2latc(1,d1);
k2 = tf2latc(1,d2);

% [EOF] - tf2cl.m

