| Wavelet Toolbox | Search  Help Desk |
| dwtmode | Examples See Also |
Discrete wavelet transform extension mode.
dwtmode
dwtmode('mode') Where 'mode' can be 'zpd', 'sym', or 'spd'
The
dwtmode command sets the signal or image extension mode for discrete wavelet and wavelet packet transforms. The extension modes represent different ways of handling the problem of border distortion in signal and image analysis. For more information, see "Dealing with Border Distortion" in Chapter 6.
dwtmode or dwtmode('status') displays the current mode.
dwtmode('mode') sets the DWT extension mode according to the value of 'mode': |
DWT Extension Mode |
|
Zero-padding (default) |
|
Symmetrization (boundary value replication) |
|
Smooth padding (first derivative interpolation at the edges) |
dwtmode is called with two input arguments, the second one is dummy and no text (status or warning) is displayed in the MATLAB command window.
The dwtmode function updates a global variable allowing three ways of signal extension. Only dwt and dwt2 use the global variable.
% If the DWT extension mode global variable does not
% exist, default is zero-padding.
clear global
dwtmode
**************************************
** DWT Extension Mode: Zero-padding **
**************************************
% Display current DWT signal extension mode.
dwtmode
**************************************
** DWT Extension Mode: Zero-Padding **
**************************************
% Change to symmetrization extension mode.
dwtmode('sym')
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! WARNING: Change DWT Extension Mode !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
****************************************
** DWT Extension Mode: Symmetrization **
****************************************
% Display current DWT signal extension mode.
dwtmode
****************************************
** DWT Extension Mode: Symmetrization **
****************************************
Note: You should change the extension mode only by using dwtmode; avoid changing the global variable directly.
Periodized wavelet transform is handled separately (see dwtper, dwtper2, idwtper, idwtper2).
dwt, dwt2