dwtmode
Discrete wavelet transform extension mode
Syntax
Description
dwtmode(
sets the signal or
image extension mode for certain discrete wavelet and wavelet packet transforms
to mode
)mode
. The dwtmode
setting has no
effect on the following functions, where the extension is self-contained:
The extension modes provide options for dealing with the problem of border distortion in signal or image analysis. For more information, see Border Effects.
Note
Functions involving the discrete wavelet transform may not use the
current extension mode for gpuArray
input. Such cases
are documented on the function reference page.
dwtmode
or dwtmode('status')
display
the current mode. If DWTMODE.DEF
exists in the current path,
the default mode is loaded from DWTMODE.DEF
at the start of
the MATLAB® session. Otherwise, the file DWTMODE.CFG
is
used.
or
st
= dwtmode
display and
return the current mode in st
= dwtmode('status')st
.
returns the current mode st
= dwtmode('status','nodisp')st
and no status or warning text
is displayed in the MATLAB command window.
dwtmode('save',
saves
mode
)mode
as the new default mode to the file
DWTMODE.DEF
in the current folder. If
DWTMODE.DEF
already exists in the current folder, the
file is overwritten. The new default mode will be active as the default mode in
the next MATLAB session.
Note
To execute in parallel any functionality that depends on the extension
mode, either save the extension mode using
dwtmode('save',mode)
before running your
parfor
loop, or call
dwtmode(mode)
inside your
parfor
loop.
Changing the extension mode in a MATLAB session does not have the desired effect if anything
dependent on that mode is called in parallel. In a parallel environment,
each worker has its own MATLAB execution engine, and each worker respects the
DWTMODE.CFG
file, but not an override in the
current session. Therefore, to run in parallel, the extension mode must
either be saved to the current folder, or the extension mode must be set
for each worker.
Executing for
-loop iterations in parallel requires
Parallel Computing Toolbox™. For more information, see parfor
(Parallel Computing Toolbox).
dwtmode('save')
is equivalent to
dwtmode('save',CURRENTMODE)
, where
CURRENTMODE
represents the current extension mode.
Examples
Input Arguments
Output Arguments
Tips
For most wavelet applications, either a periodic extension or symmetric extension works fine.
References
[1] Strang, G., and T. Nguyen. Wavelets and Filter Banks. Wellesley, MA: Wellesley-Cambridge Press, 1996.
Version History
Introduced before R2006a