Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

wthresh

Soft or hard thresholding

Syntax

Y = wthresh(X,SORH,T)
Y = wthresh(X,'s',T)
Y = wthresh(X,'h',T)

Description

Y = wthresh(X,SORH,T) returns the soft (if SORH = 's') or hard (if SORH = 'h') 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.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

See Also

| |

Introduced before R2006a

Was this topic helpful?