Soft or hard thresholding
Y = wthresh(X,SORH,T)
: Treshhold
wtresh performs either soft- or hard tresholding on X.
y = linspace(-1,1,100); thr = 0.4; // Perform hard thresholding. ythard = wthresh(y,'h',thr); // Perform soft thresholding. ytsoft = wthresh(y,'s',thr); subplot(311); plot(y,y);title("original signal"); subplot(312); plot(y,ythard);title("Hardtresholded signal"); subplot(313); plot(y,ytsoft);title("Softtresholded signal"); | ![]() | ![]() |
Holger Nahrstaedt