0

I'm trying to get wavelet decomposition of arcsin(x) using, say, Haar wavelets When using both Matlab's dwt or wavedec functions, I get strange values for approximating coefficients. Since applying low-pass Haar wavelets's filter equals to performing half-sum and the maximum of arcsin is pi/2, I assume that approximating coefficients can't surpass pi/2, yet this code:

x = linspace(0,1,128);
y = asin(x);
[cA, cD] = dwt(y, 'haar'); %//cA for approximating coefficients

returns values more than pi/2 in cA. Why is that?

Luis Mendo
  • 110,752
  • 13
  • 76
  • 147
Dmitry
  • 317
  • 3
  • 10

1 Answers1

0

I believe what makes you confused here is thinking that Haar's filter just averages two adjacent numbers when computing 1-level approximation coefficients. Due to the energy preservation feature of the scaling function, each pair of numbers gets divided by sqrt(2) instead of 2. In fact, you could see what a particular wavelet filter does by typing in the following command (for the Haar filter in this case):

[F1,F2] = wfilters('haar','d')
F1 =
    0.7071    0.7071
F2 =
   -0.7071    0.7071

You can then check the validity of what you have gotten above by constructing a simple loop:

CA_compare = zeros(1,64);
for k = 1 : 64
CA_compare(k) = dot( y(2*k-1 : 2*k), F1 );
end

You will then see that "CA_compare" contains exactly the same values as your "cA" does.

Hope this helps.

Igor
  • 1