Digital Signal Processing Reference
In-Depth Information
ans2a = hpf2 * hpf2.;
disp(sprintf( Daubechies wavelet/wavelet = %6.4f, ans2a));
ans2b = lpf2 * lpf2.;
disp(sprintf( Daubechies scaling/scaling = %6.4f, ans2b));
ans2c = lpf2 * hpf2.;
disp(sprintf( Daubechies scaling/wavelet = %6.4f, ans2c));
Running this code produces:
Daubechies wavelet/wavelet = 1.0000
Daubechies scaling/scaling = 1.0000
Daubechies scaling/wavelet = 0.0000
Thus, the code above conrms the four-coecient Daubechies wavelet.
Below is code to repeat this experiment for several other wavelets. However,
instead of specifying the lter coecients ourselves, we will rely on built-in wavelet
functions.
try
[lpf3, hpf3, lo_recon, hi_recon] = wfilters(db44);
catch
disp(You must have the wavelets toolkit for the others);
break;
end
ans3a = hpf3 * hpf3.;
disp(sprintf( Daubechies44 wavelet/wavelet = %6.4f, ans3a));
ans3b = lpf3 * lpf3.;
disp(sprintf( Daubechies44 scaling/scaling = %6.4f, ans3b));
ans3c = lpf3 * hpf3.;
disp(sprintf( Daubechies44 scaling/wavelet = %6.4f, ans3c));
[lpf4, hpf4, lo_recon, hi_recon] = wfilters(coif1);
ans4a = hpf4 * hpf4.;
disp(sprintf( Coiflets1 wavelet/wavelet = %6.4f, ans4a));
ans4b = lpf4 * lpf4.;
disp(sprintf( Coiflets1 scaling/scaling = %6.4f, ans4b));
ans4c = lpf4 * hpf4.;
disp(sprintf( Coiflets1 scaling/wavelet = %6.4f, ans4c));
Search WWH ::




Custom Search