# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# cmorwavf

Complex Morlet wavelet

## Syntax

```[PSI,X] = cmorwavf(LB,UB,N) [PSI,X] = cmorwavf(LB,UB,N,FB,FC) ```

## Description

`[PSI,X] = cmorwavf(LB,UB,N)` returns the complex Morlet wavelet, `PSI`, with time-decay parameter, `FB`, and center frequency, `FC`, both equal to 1. The general expression for the complex Morlet wavelet is

`PSI(X) = ((pi*FB)^(-0.5))*exp(2*pi*i*FC*X)*exp(-(X^2)/FB)`
`X` is evaluated on an N-point regular grid in the interval [`LB`,`UB`].

`[PSI,X] = cmorwavf(LB,UB,N,FB,FC)` returns values of the complex Morlet wavelet defined by a positive time-decay parameter, `FB`, and positive center frequency, `FC`.

`FB` controls the decay in the time domain and the corresponding energy spread (bandwidth) in the frequency domain. `FB` is the inverse of the variance in the frequency domain. Increasing `FB` makes the wavelet energy more concentrated around the center frequency and results in slower decay of the wavelet in the time domain. Decreasing `FB` results in faster decay of the wavelet in the time domain and less energy spread in the frequency domain. The value of `FB` does not affect the center frequency. When converting from scale to frequency, only the center frequency affects the frequency values. The energy spread or bandwidth parameter affects how localized the wavelet is in the frequency domain.

## Examples

collapse all

Construct a complex-valued Morlet wavelet with a bandwidth parameter of 1.5 and a center frequency of 1. Set the effective support to and the length of the wavelet to 1000.

```N = 1000; Lb = -8; Ub = 8; fb = 1.5; fc = 1; [psi,x] = cmorwavf(Lb,Ub,N,fb,fc);```

Plot the real and imaginary parts of the wavelet.

```subplot(2,1,1) plot(x,real(psi)); title('Real Part'); subplot(2,1,2) plot(x,imag(psi)); title('Imaginary Part');```

This example shows how the complex Morlet wavelet shape in the frequency domain is affected by the value of the bandwidth parameter (`Fb`). Both wavelets have a center frequency of 1. One wavelet has an `Fb` value of 0.5 and the other wavelet has a value of 8.

```f = -5:.01:5; Fc = 1; Fb1 = 0.5; Fb2 = 8; psihat1 = exp(-pi^2*Fb1*(f-Fc).^2); psihat2 = exp(-pi^2*Fb2*(f-Fc).^2); plot(f,psihat1) hold on; plot(f,psihat2,'r') legend('Fb = 0.5','Fb = 8')```

The `Fb` bandwidth parameter for the complex Morlet wavelet is the inverse of the variance in frequency. Therefore, increasing Fb results in a narrower concentration of energy around the center frequency.

## References

Teolis, A. (1998), Computational signal processing with wavelets, Birkhauser, p. 65.