Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm trying to compute some wavelet transforms and I seem to be running into some boundary condition errors. I have a randomly generated signal pictured at the top of the figure, and the real part of a scaled Morlet wavelet shown in the middle figure.

I have a list of the function values at a series of points ${t_0,t_1, t_2, ... t_N}$. If I compute a discrete correlation between the two functions pictured below I get the result I show in the third figure. I compute a correlation according to the following formula:

$z[k] = | \sum_{i=0}^{N-1} x[i] y^*[i+k] |$.

The formula assumes that my functions go to zero outside the region $[t_0, t_N]$. I believe the spikes in the end points of my correlation are errors from boundary conditions, but I'm not sure how to fix it.

enter image description here

share|improve this question
    
dsp.stackexchange.com is more suitable for this question –  chaohuang Jul 15 '12 at 21:13

1 Answer 1

up vote 1 down vote accepted

When your wavelet function is out of the window or partially outside you can have different correlation pattern from the whole picture. One way to solve this problem is to consider circular convolution idea for the correlation. In this case the portion of your wavelet which leaves the window from right should come inside from the left. In a similar way when it leaves the window from the right. It is just the same idea for modulo operations but your module is your window size. I hope it helps.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.