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?
|
|
0
|
|
|
|
Reply
|
Ravi
|
4/19/2010 2:46:26 PM |
|
"Ravi Rastogi" <raviras@gmail.com> wrote in message <hqhqc2$1sc$1@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
|
|
0
|
|
|
|
Reply
|
Wayne
|
4/19/2010 5:39:04 PM
|
|
"Wayne King" <wmkingty@gmail.com> wrote in message <hqi4fo$513$1@fred.mathworks.com>...
> "Ravi Rastogi" <raviras@gmail.com> wrote in message <hqhqc2$1sc$1@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
Hi Wayne,
This defiantly makes sense.
Thanks.
Regards,
Ravi
|
|
0
|
|
|
|
Reply
|
Ravi
|
4/22/2010 9:38:20 PM
|
|
"Wayne King" <wmkingty@gmail.com> wrote in message <hqi4fo$513$1@fred.mathworks.com>...
> "Ravi Rastogi" <raviras@gmail.com> wrote in message <hqhqc2$1sc$1@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
Hi Wayne,
This defiantly makes sense.
Thanks.
Regards,
Ravi
|
|
0
|
|
|
|
Reply
|
Ravi
|
4/22/2010 9:41:21 PM
|
|
"Wayne King" <wmkingty@gmail.com> wrote in message <hqi4fo$513$1@fred.mathworks.com>...
> "Ravi Rastogi" <raviras@gmail.com> wrote in message <hqhqc2$1sc$1@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
Hi Wayne,
I understood that when we use the function intwave, it loads the values of the wavelet specified and then integrates it to give you val_WAV having points equal to 2^(precis).
Later this wavelet has to be scaled and then translated over the signal to determine the coefficient right? I am not able to get the scaled version of the wavelet, what i get is a part of the wavelet that is being convolved with the SIG.
Here is what i am doing. Where am i going wrong? I want to see the scaled wavelets at individual scales.
%%Load the Wavelet to be used:
WAV='morl';
[val_WAV,xWAV]=intwave(WAV,10); %Precis is value of the octave(p):2^p=length of the wavelet val_WAV
stepWAV = xWAV(2)-xWAV(1);
xMaxWAV = xWAV(end);
%%Plot the Mother Wavelet:
figure;
plot(val_WAV);
title('Mother Wavelet');
%%Enter the Scale at which the wavelet is determined:
a = 15; %Scale
stepSIG=1;
a_SIG = a/stepSIG; %This helps us in contracting the wavelet in time: largest to smallest as value increases
j = 1+floor((0:a_SIG*xMaxWAV)/(a_SIG*stepWAV)); %This would be a vector
if length(j)==1 , j = [1 1]; end %This was to fix the bug of length=1 data
f = val_WAV(j); %This would flip the values of the data at positions j from left to right
figure;
plot(f);
title('Plot of the scaled Wavelet');
|
|
0
|
|
|
|
Reply
|
Ravi
|
4/26/2010 3:50:22 PM
|
|
|
4 Replies
311 Views
(page loaded in 0.07 seconds)
Similiar Articles: Regarding Matlab cwt function - comp.soft-sys.matlabHi guys, Well i was looking at the matlab cwt (continuous wavelet transform) function, to understand how are the wavelet coefficients calculated. I... matlab function - comp.soft-sys.matlabRegarding Matlab cwt function - comp.soft-sys.matlab Hi guys, Well i was looking at the matlab cwt (continuous wavelet transform) function, to understand how are the ... Wavelet coefficients - comp.soft-sys.matlabRegarding Matlab cwt function - comp.soft-sys.matlab Hi guys, Well i was looking at the matlab cwt (continuous wavelet transform) function, to understand how are the ... section, line and path errors - comp.dcom.sdh-sonetJ-SDH - comp.dcom.sdh-sonet Regarding Matlab cwt function - comp.soft-sys.matlab section, line and path errors - comp.dcom.sdh-sonet I have some doubts regarding differnt ... Matlab Builder JA - Too many input arguments - comp.soft-sys ...Question regarding pragma translate_off/on , synthesis_off/on ... ... tool builders like Verific should not interfere too much ... cwt function - comp.soft-sys.matlab ... Frequency Resolution of the DFT - comp.dsp... could get > confusing:) IIRC, I have not seen uniform terminology regarding ... wave) -Amplitude -Duration ... that the best solution is to u= se matlab's fft() function to ... Regarding Matlab cwt function - comp.soft-sys.matlab | Computer GroupHi guys, Well i was looking at the matlab cwt (continuous wavelet transform) function, to understand how are the wavelet coefficients calculated. I... matlab function - comp.soft-sys.matlab | Computer GroupRegarding Matlab cwt function - comp.soft-sys.matlab Hi guys, Well i was looking at the matlab cwt (continuous wavelet transform) function, to understand how are the ... 7/26/2012 4:22:52 AM
|