dauborth

PURPOSE ^

dauborth.m

SYNOPSIS ^

function [h0,h1,g0,g1] = dauborth(M)

DESCRIPTION ^

 dauborth.m

 Filter coefficients for Daubechies' compactly supported wavelets.
 Usage: [h0,h1,g0,g1] = dauborth(M)
 h0 - analysis scaling filter
 h1 - analysis wavelet filter, M/2 vanishing moments
 g0 - synthesis scaling filter
 g1 - synthesis wavelet filter

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % dauborth.m
0002 %
0003 % Filter coefficients for Daubechies' compactly supported wavelets.
0004 % Usage: [h0,h1,g0,g1] = dauborth(M)
0005 % h0 - analysis scaling filter
0006 % h1 - analysis wavelet filter, M/2 vanishing moments
0007 % g0 - synthesis scaling filter
0008 % g1 - synthesis wavelet filter
0009 %
0010 % Written by: Justin Romberg
0011 % Created: 3/23/2004
0012 
0013 function [h0,h1,g0,g1] = dauborth(M)
0014 
0015 if (mod(M,2) ~= 0)
0016   error('M must be even.')
0017 end
0018 
0019 [P,Q] = daubpoly(M/2);
0020 
0021 qr = sort(roots(Q));
0022 hr = [-ones(M/2,1); qr(1:M/2-1)];
0023 gr = [-ones(M/2,1); qr(M/2:M-2)];
0024 
0025 h0p = poly(hr);
0026 g0p = poly(gr);
0027 h0 = sqrt(2)*h0p/sum(h0p);
0028 g0 = sqrt(2)*g0p/sum(g0p);
0029 h1 = (-1).^(1:M).*g0;
0030 g1 = (-1).^(0:M-1).*h0;
0031 
0032 % flip h0 and g0 to produce functions in the text
0033 % h0 = fliplr(h0);
0034 % g0 = fliplr(g0);
0035 % h1 = (-1).^(1:M).*g0;
0036 % g1 = (-1).^(0:M-1).*h0;
0037 
0038 % another source: http://wavelets.pybytes.com/wavelet/db4/

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