www.gusucode.com > wavelet 源码程序 matlab案例代码 > wavelet/DaubechiesExtremalPhaseScalingFilterWithSpecifiedSumExample.m

    %% Daubechies' Extremal Phase Scaling Filter with Specified Sum
% This example shows to determine the Daubechies' extremal phase scaling
% filter with a specified sum. The two most common values for the sum are 
% $\sqrt{2}$ and 1.
%%
% Construct two versions of the |'db4'| scaling filter. One scaling filter
% sums to $\sqrt{2}$ and the other version sums to 1.

% Copyright 2015 The MathWorks, Inc.

NumVanishingMoments = 4;
h = dbaux(NumVanishingMoments,sqrt(2));
m0 = dbaux(NumVanishingMoments,1);
%%
% The filter with sum equal to $\sqrt{2}$ is the synthesis (reconstruction)
% filter returned by |wfilters| and used in the discrete wavelet transform.
[LoD,HiD,LoR,HiR] = wfilters('db4');
max(abs(LoR-h))
%%
% For orthogonal wavelets, the analysis (decomposition) filter is the
% time-reverse of the synthesis filter.
max(abs(LoD-fliplr(h)))