daubpoly

PURPOSE ^

daubpoly.m

SYNOPSIS ^

function [P, Q] = daubpoly(p)

DESCRIPTION ^

 daubpoly.m

 Daubechies polynomial for compactly supported wavelets.
 Factor the answer in different ways to get differnet filter coeffs.
 Usage : [P, Q] = daubpoly(p)
 Q - polynomial for roots at locations other than -1 (for PR)
 P - polynomial conv(q,(1+z)^(2*p))
 Ex:  
    let qr = roots(Q), pr = roots(P)
    set h0 = poly([-ones(1,p); qr(1:p-1)])
        g0 = poly([-ones(1,p); qr(p:2*p-2)])
    for Daub orthonormal basis

 Written by : Justin Romberg
 Created : 3/23/2004

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % daubpoly.m
0002 %
0003 % Daubechies polynomial for compactly supported wavelets.
0004 % Factor the answer in different ways to get differnet filter coeffs.
0005 % Usage : [P, Q] = daubpoly(p)
0006 % Q - polynomial for roots at locations other than -1 (for PR)
0007 % P - polynomial conv(q,(1+z)^(2*p))
0008 % Ex:
0009 %    let qr = roots(Q), pr = roots(P)
0010 %    set h0 = poly([-ones(1,p); qr(1:p-1)])
0011 %        g0 = poly([-ones(1,p); qr(p:2*p-2)])
0012 %    for Daub orthonormal basis
0013 %
0014 % Written by : Justin Romberg
0015 % Created : 3/23/2004
0016 
0017 function [P, Q] = daubpoly(p)
0018 
0019 B = binom(2*p,0:2*p);
0020 qm = zeros(2*p-1);
0021 B2 = [zeros(1,2*p-3) B zeros(1,2*p-3)];
0022 for kk = 1:2*p-1
0023   qm(kk,:) = fliplr(B2(2*(kk-1)+1:2*(kk-1)+2*p-1));
0024 end
0025 Q = inv(qm)*[zeros(1,p-1) 1 zeros(1,p-1)]';
0026 P = conv(Q,B);

Generated on Mon 10-Jun-2013 23:03:23 by m2html © 2005