function c = clip(s,mag)
%
% clip: sets all values of s that are less than mag to zero
% On input:
%     s: 2D array
%     mag: threshold value
% On output:
%     c: 2D array with all values > mag
% Call:
%     c = clip(s,mag)
%

[m,n] = size(s);
s2 = abs(s)>mag*ones(m,n);
c = s.*s2;
