## Wavelet Toolbox |

The purpose of this example is to show how analysis by wavelets can detect a self-similar, or fractal, signal. The work of many authors and the trials that they have carried out suggest that wavelet decomposition is very well adapted to the study of the fractal properties of signals and images. When the characteristics of a fractal evolve with time and become local, the signal is called a multifractal. The wavelets then are an especially suitable tool for practical analysis and generation.

The signal here is the Koch curve -- a synthetic signal that is built recursively. Let's visualize the signal and zoom in one section.

load vonkoch; plot(vonkoch,'r'); xlim([1 length(vonkoch)]); title('Analyzed signal - Koch curve'); xlabel('Time (or Space)'); ylabel('Amplitude'); figure('Color','white'); plot(vonkoch,'r'); xlim([3250 4120]); title('Analyzed signal - Koch curve'); xlabel('Time (or Space)'); ylabel('Amplitude');

From an intuitive point of view, the wavelet decomposition consists of calculating a "resemblance index" between the signal and the wavelet. If the index is large, the resemblance is strong, otherwise it is slight. The indices are the wavelet coefficients. If a signal is similar to itself at different scales, then the "resemblance index" or wavelet coefficients also will be similar at different scales. In the coefficients plot, which shows scale on the vertical axis, this self-similarity generates a characteristic pattern.

The command waveinfo displays the main properties of a wavelet family.

```
waveinfo('coif')
```

Information on coiflets. Coiflets Wavelets General characteristics: Compactly supported wavelets with highest number of vanishing moments for both phi and psi for a given support width. Family Coiflets Short name coif Order N N = 1, 2, ..., 5 Examples coif2, coif4 Orthogonal yes Biorthogonal yes Compact support yes DWT possible CWT possible Support width 6N-1 Filters length 6N Regularity Symmetry near from Number of vanishing moments for psi 2N Number of vanishing moments for phi 2N-1 Reference: I. Daubechies, Ten lectures on wavelets, CBMS, SIAM, 61, 1994, 258-261.

Let's compute the continuous wavelet transform (CWT) of the Koch curve:

scales = 2:2:128; wname = 'coif3'; cwt(vonkoch,scales,wname,'abslvl'); xlim([3250 4120]); colormap(pink(128));

A repeating pattern in the wavelet coefficients plot is characteristic of a signal that looks similar on many scales.