nag_mldwt (c09ccc) computes the one-dimensional multi-level discrete wavelet transform (DWT). The initialization function
nag_wfilt (c09aac) must be called first to set up the DWT options.
nag_mldwt (c09ccc) computes the multi-level DWT of one-dimensional data. For a given wavelet and end extension method, nag_mldwt (c09ccc) will compute a multi-level transform of a data array,
, for
,
using a specified number,
, of levels. The number of levels specified,
, must be no more than the value
returned in
nwlmax by the initialization function
nag_wfilt (c09aac) for the given problem. The transform is returned as a set of coefficients for the different levels (packed into a single array) and a representation of the multi-level structure.
None.
The accuracy of the wavelet transform depends only on the floating-point operations used in the convolution and downsampling and should thus be close to machine precision.
Not applicable.
The wavelet coefficients at each level can be extracted from the output array
c using the information contained in
dwtlev on exit (see the descriptions of
c and
dwtlev in
Section 5). For example, given an input data set,
, denoising can be carried out by applying a thresholding operation to the detail coefficients at every level. The elements
, for
, as described in
Section 5, contain the detail coefficients,
, for
and
, where
and
is the transformed noise term. If some threshold parameter
is chosen, a simple hard thresholding rule can be applied as
taking
to be an approximation to the required detail coefficient without noise,
. The resulting coefficients can then be used as input to
nag_imldwt (c09cdc) in order to reconstruct the denoised signal.
See the references given in the introduction to this chapter for a more complete account of wavelet denoising and other applications.
This example performs a multi-level resolution of a dataset using the Daubechies wavelet (see
in
nag_wfilt (c09aac)) using zero end extensions, the number of levels of resolution, the number of coefficients in each level and the coefficients themselves are reused. The original dataset is then reconstructed using
nag_imldwt (c09cdc).