function  x = HardTh(y,thld)
%    x = HardTh(y,thld); 
%
%    HARDTH hard thresholds the input signal y with the threshold value
%    thld.
%
%    Input:  
%       y    : 1D or 2D signal to be thresholded
%       thld : threshold value
%
%    Output: 
%       x : Hard thresholded output (x = (abs(y)>thld).*y)
%
%  HERE'S AN EASY WAY TO RUN THE EXAMPLES:
%  Cut-and-paste the example you want to run to a new file 
%  called ex.m, for example. Delete out the % at the beginning 
%  of each line in ex.m (Can use search-and-replace in your editor
%  to replace it with a space). Type 'ex' in matlab and hit return.
%
%
%    Example:
%       y = makesig('WernerSorrows',8);
%       thld = 1;
%       x = HardTh(y,thld)
%       x = 1.5545 5.3175 0 1.6956  -1.2678 0 1.7332 0
%
%    See also: SoftTh
%

%File Name: HardTh.m
%Last Modification Date: 8/15/95	17:49:37
%Current Version: HardTh.m	1.5
%File Creation Date: Mon Jan 31 09:42:50 1994
%Author: Haitao Guo  <harry@jazz.rice.edu>
%
%Copyright: All software, documentation, and related files in this distribution
%           are Copyright (c) 1994  Rice University
%
%Permission is granted for use and non-profit distribution providing that this
%notice be clearly maintained. The right to distribute any portion for profit
%or as part of any commercial product is specifically reserved for the author.
%
%Change History:
%

x = (abs(y) > thld).*y; 
