[w,s,xvals] = wavfun(g) [w,s,xvals] = wavfun(g,N)
w | Wavelet filterbank |
N | Number of iterations |
wfunc | Approximation of wavelet function(s) |
sfunc | Approximation of the scaling function |
xvals | Correct x-axis values |
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):
WARNING: The output array lengths L depend on N exponentially like:
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.
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');