threshold

 

Apply hard or soft thresholding to data

 

DESCRIPTION

 

Given a data value or a vector of data, threshold the data at a specified value

 

USAGE

 

threshold(x,t,hard)

 

REQUIRED ARGUMENTS

 

x a data value or a vector of data
t the value of the threshold to be used

 

OPTIONAL ARGUMENTS

 

hard if 1 hard thresholding is applied, otherwise soft thresholding is used.

 

VALUE

A value or vector of values the same length as x, containing the result of the relevant thresholding rule applied to x.

EXAMPLES

threshld((-5:5), 1.4, 0)