Thresholding

threshold(M, thresh) Returns the matrix M with every element below thresh set to thresh. If thresh is negative, every element above -thresh is set to -thresh.

Arguments: