From: Wayne King on
"Ravi Rastogi" <raviras(a)gmail.com> wrote in message <hqhqc2$1sc$1(a)fred.mathworks.com>...
> Hi guys,
>
> Well i was looking at the matlab cwt (continuous wavelet transform) function, to understand how are the wavelet coefficients calculated. I understood the steps untill the coefficients are determined.
> Here are the steps:
> 1) Check if the data is numeric, structure or cell? as the data loaded can be of different data types.
> 2) Check the wavelet if its character, numeric, structure or cell?
> This is also understandable.
> 3) Some more preprocessing of data and wavelet.
> 4) Coefficients are determined using the equation below for individual scales:
> coeff(Index_of_scale,:)= -sqrt(scale) * wkeep1( diff (wconv1 (signal, wavelet), len_of_signal ) );
>
> I can understand that the wavelet needs to be convolved with the signal to represent multiplication in time domain, then why are we differentiating or finding the difference between consecutive data values after the convolution? Which formula or equation was used to determine the coefficients?

Hi Ravi,

The confusion about the use of diff(conv(x,y)) is because what is being fed into the convolution is the integral of the wavelet.

e.g.:
[val_WAV,xWAV] = intwave(WAV,precis);

The derivative of the convolution of two functions f,g is the convolution of the one with the derivative of the other, d/dt (f*g)=(f* d/dt g) and taking the derivative of the integral of the wavelet yields the wavelet. In other words, by using diff() you're just convolving the input function with the wavelet.

Hope that helps,
Wayne