Convert coupled allpass filter to transfer function form
d1 and d2 are real vectors corresponding to the denominators of the allpass filters H1(z) and H2(z).
[b,a]=ca2tf(d1,d2,beta) where d1, d2 and beta are complex, returns the vector of coefficients b and the vector of coefficients a corresponding to the numerator and the denominator of the transfer function
[b,a,bp]=ca2tf(d1,d2,beta), where d1, d2 and beta are complex, returns the vector of coefficients bp of real or complex coefficients that correspond to the numerator of the power complementary filter G(z)
Create a filter, convert the filter to coupled allpass form, and convert the result back to the original structure (create the power complementary filter as well).
% tf2ca returns the % denominators of the % allpasses.
% Reconstruct the original % filter plus the power % complementary one.
hpc = freqz(numpc,den);
s.plot = 'mag';
s.yunits = 'sq';
% Plot the mag response of the % original filter and the % power complementary one.