Wavelet Toolbox |
Syntax
Description
Y = wthresh(X,SORH,T)
returns the soft (if SORH
= 's'
) or hard (if SORH
= 'h'
) T
-thresholding of the input vector or matrix X
. T
is the threshold value.
Y = wthresh(X,'s',T)
returns , soft thresholding is wavelet shrinkage ( (x)+ = 0 if x < 0; (x)+ = x, if x 0 ).
Y = wthresh(X,'h',T)
returns , hard thresholding is cruder.
Examples
% Generate signal and set threshold. y = linspace(-1,1,100); thr = 0.4; % Perform hard thresholding. ythard = wthresh(y,'h',thr); % Perform soft thresholding. ytsoft = wthresh(y,'s',thr); % Using some plotting commands, % the following figure is generated.
See Also
wden
,
wdencmp
,
wpdencmp
wthcoef2 | wthrmngr |
© 1994-2005 The MathWorks, Inc.