One-dimensional discrete wavelet transforms (DWT) or maximum overlap wavelet transforms (MODWT) are characterised by the mother wavelet, the end extension method and whether multiresolution analysis is to be performed. For the selected combination of choices for these three characteristics, and for a given length,
, of the input data array,
,
nag_wav_1d_init (c09aa) returns the dimension details for the transform determined by this combination. The dimension details are:
, the maximum number of levels of resolution that that could be computed were a multi-level DWT/MODWT applied;
, the filter length;
the number of approximation (or detail) coefficients for a single-level DWT/MODWT or the total number of coefficients generated by a multi-level DWT/MODWT over
levels. These values are also stored in the communication array
icomm, as are the input choices, so that they may be conveniently communicated to the one-dimensional transform functions in this chapter.
None.
- 1:
– string
-
The name of the mother wavelet. See the
C09 Chapter Introduction for details.
- Haar wavelet.
- , where
- Daubechies wavelet with vanishing moments ( coefficients). For example, is the name for the Daubechies wavelet with vanishing moments ( coefficients).
- ., where . can be one of 1.1, 1.3, 1.5, 2.2, 2.4, 2.6, 2.8, 3.1, 3.3, 3.5 or 3.7
- Biorthogonal wavelet of order .. For example is the name for the biorthogonal wavelet of order .
Constraint:
, , , , , , , , , , , , , , , , , , , or .
- 2:
– string (length ≥ 1)
-
The type of discrete wavelet transform that is to be applied.
- Single-level decomposition or reconstruction by discrete wavelet transform.
- Multiresolution, by a multi-level DWT or its inverse.
- Single-level decomposition or reconstruction by maximal overlap discrete wavelet transform.
- Multi-level resolution by a maximal overlap discrete wavelet transform or its inverse.
Constraint:
, , or .
- 3:
– string (length ≥ 1)
-
The end extension method. Note that only periodic end extension is currently available for the MODWT.
- Periodic end extension.
- Half-point symmetric end extension.
- Whole-point symmetric end extension.
- Zero end extension.
Constraints:
- , , or for DWT;
- for MODWT.
- 4:
– int64int32nag_int scalar
-
The number of elements, , in the input data array, .
Constraint:
.
None.
Not applicable.
None.
function c09aa_example
fprintf('c09aa example results\n\n');
n = int64(8);
wavnam = 'Haar';
mode = 'zero';
wtrans = 'Multilevel';
x = [2; 5; 8; 9; 7; 4; -1; 1];
fprintf('\n Input Data:\n');
fprintf('%8.3f', x);
fprintf('\n\n');
[nwl, nf, nwc, icomm, ifail] = c09aa(wavnam, wtrans, mode, n);
if ifail == int64(0)
[c, dwtlev, icomm, ifail] = c09cc(x, nwc, nwl, icomm);
if ifail == int64(0)
fprintf(' Length of wavelet filter : %10d\n', nf);
fprintf(' Number of Levels : %10d\n\n', nwl);
fprintf(' Number of coefficients in each level :\n ');
fprintf(' %8d', dwtlev);
fprintf('\n');
fprintf(' Total number of wavelet coefficients : %10d\n\n', nwc);
fprintf(' Wavelet coefficients C : \n');
fprintf(' %8.3f', c);
fprintf('\n');
[y, ifail] = c09cd(nwl, c, n, icomm);
if ifail == int64(0)
fprintf('\n Reconstruction Y : \n');
fprintf(' %8.3f', y);
fprintf('\n');
end
end
end