function out=enhance(s,thres,clip)
% ENHANCE(in,thres,clip) enhance signal
% enhance signal

        smax=max(max(s));
        smin=min(min(s));
        s(find(s>smax*thres))=s(find(s>smax*thres))*(1.-clip)+clip*smax;
        s(find(s<smin*thres))=s(find(s<smin*thres))*(1.-clip)+clip*smin;

	out=s;



