# Cardinal order-2 balanced multiscaling filters # This is a Maple file. In Maple type read(`setup`); # This file generates the charaterizing equations and # writes them to the file "eqs" # --------- define filter G(z) ---------- gk := 'gk'; G := z -> sum(g(gk)*z^gk,gk=0..5); # ---------- define filter H0(z), H1(z) ---------- H0 := z^3 + G(z^2); H1 := z^5 + z^10*G(-1/z^2); H0 := sort(expand(H0)); H1 := sort(expand(H1)); # ---------- balancing conditions ---------- P := z^3+z^2+z+1; V1 := 1; V2 := (3-z^4)/2; R1 := rem(H0+V1*H1,P^1,z); R2 := rem(H0+V2*H1,P^2,z); # ---------- print balancing conditions to file ---------- interface(screenwidth=300); writeto(`eqs`); k := 'k': for k from 0 to 10 do lprint(coeff(R2,z,k),`,`); od; # ---------- orthogonality conditions ---------- H0H0 := collect(expand(H0*subs(z=1/z,H0)),z): H1H1 := collect(expand(H1*subs(z=1/z,H1)),z): H0H1 := collect(expand(H0*subs(z=1/z,H1)),z): k := 'k': for k from -7 to 7 do lprint(coeff(H0H1,z,4*k),`,`); od; k := 'k': for k from 1 to 5 do lprint(coeff(H0H0,z,4*k),`,`); lprint(coeff(H1H1,z,4*k),`,`); od; # ---------- normalization conditions ---------- nor := G(1) - 1: lprint(nor,`;`); # note: put a semicolon at the end of the LAST eq writeto(terminal); interface(screenwidth=80);