You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: HardTh.m
    path of file: ./repos/CS_MoCo_LAB/reconstruction/matlab/CS_LAB_matlab/utils/utils_WaveletRice
    
    the code of the file until where you have to start completion: 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	2.4
%File Creation Date: Mon Jan 31 09:42:50 1994
%Author: Haitao Guo  <harry@jazz.rice.edu>
%
%Copyright (c) 2000 RICE UNIVERSITY. All rights reserved.
%Created by Haitao Guo, Department of ECE, Rice University. 
%
%This software is distributed and licensed to you on a non-exclusive 
%basis, free-of-charge. Redistribution and use in source and binary forms, 
%with or without modification, are permitted provided that the following 
%conditions are met:

    
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	2.4
%File Creation Date: Mon Jan 31 09:42:50 1994
%Author: Haitao Guo  <harry@jazz.rice.edu>
%
%Copyright (c) 2000 RICE UNIVERSITY. All rights reserved.
%Created by Haitao Guo, Department of ECE, Rice University. 
%
%This software is distributed and licensed to you on a non-exclusive 
%basis, free-of-charge. Redistribution and use in source and binary forms, 
%with or without modification, are permitted provided that the following 
%conditions are met:
%
%1. Redistribution of source code must retain the above copyright notice, 
%   this list of conditions and the following disclaimer.
%2. Redistribution in binary form must reproduce the above copyright notice, 
%   this list of conditions and the following disclaimer in the 
%   documentation and/or other materials provided with the distribution.
%3. All advertising materials mentioning features or use of this software 
%   must display the following acknowledgment: This product includes 
%   software developed by Rice University, Houston, Texas and its contributors.
%4. Neither the name of the University nor the names of its contributors 
%   may be used to end