Computes the lattice-ladder coefficients from an IIR filter coefficients
[k,c] = dir2ladr(b,a)
Numerator coefficients of the IIR filter
Denominator coefficients of the IIR filter
Lattice coefficients of the IIR filter
Ladder coefficients of the IIR filter
It computes the lattice and ladder coefficients from the numerical and the denominator coefficients of an IIR filter. The number of Denominator coefficients must be greater than or equal to the number of numerator coefficients. For an all-poles IIR filter, numerator coefficient is taken as 1. The generated lattice and the ladder coefficients are used for filtering purpose using a lattice ladder filter.
//A discrete Signal X=[ 3, 7, 1 , 8, 12, 5, -3, -1, 4, 7, 3, 1]; // IIR filter coefficients // Numerator coefficients B=[1, 2, 2, 1]; B=B/sum(B); // Denominator coefficients A=[1,13/24,5/8,1/3]; // Lattice -ladder coefficients [K,C]=dir2ladr(B,A); // Filtering X with K and C Y=ladrfilt(K,C,X); //Direct filtering using B and A Yd=filter(B,A,X) //To find lattice coefficients for an all-poles filter // The numerator coefficient vector B=[1]; [K,C]=dir2ladr(1,A); // Filtering with coefficients K and C can be done using ladrfilt. Y=ladrfilt(K,C,X) //Direct filtering of all-poles filter Yd=filter(1,A,X) | ![]() | ![]() |