function [trimmedw] = threshold(w,tol) % FUNCTION: threshold Part of DPWT Toolbox % % USAGE: TRIMMEDW = threshold(W, TOL) % % DESCRIPTION: Finds every element of W whose absolute value is less % than TOL and sets that element to 0 to produce the % vector TRIMMEDW. % % EXAMPLE: threshold([1,2,3,4],2) % % ans = % % 0 2 3 4 % % AUTHOR: Neil Getz % DATE: 2-12-92 % % COPYRIGHT 1992, Neil Getz % trimmedw = ( abs( w ) >= tol ) .* w;