7

I know that the complex wavelet transform is given by $$\int_{-\infty}^{\infty}f(x)\psi^*_{s,u}(x)\,dx$$ where $f$ is the signal, $\psi_{s,u}(x)=\frac{1}{\sqrt{s}}\psi(\frac{x-u}{s})$ is the wavelet. and $^*$ denotes the complex conjugate operation.

If I have the wavelet $\psi_{s,u}$, which is represented by psi in MATLAB, and I want to compute the above integral. Which command should I use for computation in MATLAB?

conv(f,psi) or conv(f,conj(psi))?

since conj computes the complex conjugate of a vector? Thanks in advance!

Royi
  • 19,608
  • 4
  • 197
  • 238
meta_warrior
  • 617
  • 6
  • 20

3 Answers3

3

The complex conjugate is applied in the frequency domain, which corresponds to flipping the signal backwards in the time domain. When you have $$f(x)\psi^*_{s,u}(x)$$ this is a multiplication in the frequency domain. Multiplication becomes convolution in the time domain. So you should use conv(f,fliplr(psi))

Aaron
  • 1,412
  • 8
  • 8
  • The question is in the "Time Domain" not Frequency Domain. The conjugation in this case is the definition of Inner Product. Have a look on my answer. – Royi Aug 26 '18 at 06:36
2

At least with MATLAB it seems you can simply run conv(signal, wavelet), which 'flips' the wavelet for you - compare xcorr(). Flipping in time is part of the definition of convolution (as previous responses have noted), and therefore implemented within MATLAB's function.

So for real signal and wavelet in time, conv(signal, fliplr(wavelet)) == xcorr(signal, wavelet). For real signals and complex wavelet however, conv(signal, conj(fliplr(cwavelet))) == xcorr(signal, cwavelet). By comparing convolution with cross-correlation in this way, the involvement of flipping and complex conjugation becomes apparent.

MATLAB says so themselves (w.r.t circular convolution) cconv().

lennon310
  • 3,590
  • 19
  • 24
  • 27
benxyzzy
  • 121
  • 2
1

The Conjugation is part of the definition of the Convolution as an Inner Product operation.
So you wrote the operation correctly.

Usually people uses "Real" Wavelets hence no need for that.

Anyhow, the definition is an inner product (Projecting the function onto the base of the wavelets) and it requires the conjugation operation.

Royi
  • 19,608
  • 4
  • 197
  • 238