Wavelet Toolbox 

The purpose of this example is to show how analysis by wavelets can detect a selfsimilar, 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.
On this page… 

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'); set(gca,'XLim',[1 length(vonkoch)]) title('Analyzed signal  Koch curve'); xlabel('Time (or Space)');ylabel('Amplitude') figure('Color','white') plot(vonkoch,'r'); set(gca,'XLim',[3250 4120]) title('Analyzed signal  Koch curve'); xlabel('Time (or Space)');ylabel('Amplitude')
Wavelet Coefficients and SelfSimilarity
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 selfsimilarity 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 6N1 Filters length 6N Regularity Symmetry near from Number of vanishing moments for psi 2N Number of vanishing moments for phi 2N1 Reference: I. Daubechies, Ten lectures on wavelets, CBMS, SIAM, 61, 1994, 258261.
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.