4
$\begingroup$

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!

$\endgroup$
1
$\begingroup$

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))

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – Royi Aug 26 '18 at 6:36
1
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ conv(f,psi) or conv(f,conj(psi))? $\endgroup$ – benxyzzy Sep 14 '18 at 15:03
  • $\begingroup$ @benxyzzy, What do you mean? Do you have a case where f or psi is complex? $\endgroup$ – Royi Sep 14 '18 at 17:49
  • $\begingroup$ Yes, real signal f but complex Morlet psi, as produced by cmorwavf(). Both are 1D over time. $\endgroup$ – benxyzzy Sep 15 '18 at 16:24
0
$\begingroup$

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 say so themselves (wrt circular convolution) here: https://uk.mathworks.com/help/signal/ref/cconv.html#buzbj12

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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