This is where navigation should be.

WAVFUN - Wavelet Function

Usage

[w,s,xvals] = wavfun(g)
[w,s,xvals] = wavfun(g,N)

Input parameters

w Wavelet filterbank
N Number of iterations

Output parameters

wfunc Approximation of wavelet function(s)
sfunc Approximation of the scaling function
xvals Correct x-axis values

Description

Iteratively generate (N iterations) a discrete approximation of wavelet and scaling functions using filters obtained from w. The possible formats of w are the same as for the fwt function. The algorithm is equal to the DWT reconstruction of a single coefficient at level \(N+1\) set to 1. xvals contains correct x-axis values. All but last columns belong to the wfunc, last one to the sfunc.

The following flags are supported (first is default):

'fft', 'conv'
How to do the computations. Whatever is faster depends on the speed of the conv2 function.

WARNING: The output array lengths L depend on N exponentially like:

\begin{equation*} L=\frac{a^N-1}{a-1}(m-1)+1 \end{equation*}

where a is subsamling factor after the lowpass filter in the wavelet filterbank and m is length of the filters. Expect issues for high N e.g. 'db10' (\(m=20\)) and \(N=20\) yields a ~150MB array.

Examples:

Approximation of a Daubechies wavelet and scaling functions from the 12 tap filters:

[wfn,sfn,xvals] = wavfun('db6');
plot(xvals,[wfn,sfn]);
legend('wavelet function','scaling function');