function w=cleanmatrix(mat, scale) % usage: w=cleanmatrix(mat,scale) % dscription: zeros out entries xmat) .* mat;