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: lsq_thresholding.m
    path of file: ./repos/SparseReg/private
    
    the code of the file until where you have to start completion: function [xmin] = lsq_thresholding(a,b,lambda,pentype,penparam)
%LSQ_THRESHOLDING Performs univariate least square thresholding
%   argmin 0.5*a*x^2 + b*x + pen(abs(x),lambda)
%
% INPUT
%   a: n-by-1 quadratic coefficient
%   b: n-by-1 linear coefficient
%   lambda: penalty constant (>=0)
%   penname - 'enet'|'log'|'mcp'|'power'|'scad'
%   penargs - index parameter for penalty function penname; allowed range
%       enet [1,2] (1 by default), log (0,inf) (1 by default), mcp (0,inf) 
%       (1 by default), power (0,2] (1 by default), scad (2,inf) (3.7 by default)
%
% OUTPUT
%   xmin: argmin 0.5*a*x^2 + b*x + pen(abs(x),lambda)
%
% COPYRIGHT: North Carolina State University
% AUTHOR: Hua Zhou (hua_zhou@ncsu.edu), Artin Armagan

    
function [xmin] = lsq_thresholding(a,b,lambda,pentype,penparam)
%LSQ_THRESHOLDING Performs univariate least square thresholding
%   argmin 0.5*a*x^2 + b*x + pen(abs(x),lambda)
%
% INPUT
%   a: n-by-1 quadratic coefficient
%   b: n-by-1 linear coefficient
%   lambda: penalty constant (>=0)
%   penname - 'enet'|'log'|'mcp'|'power'|'scad'
%   penargs - index parameter for penalty function penname; allowed range
%       enet [1,2] (1 by default), log (0,inf) (1 by default), mcp (0,inf) 
%       (1 by default), power (0,2] (1 by default), scad (2,inf) (3.7 by default)
%
% OUTPUT
%   xmin: argmin 0.5*a*x^2 + b*x + pen(abs(x),lambda)
%
% COPYRIGHT: North Carolina State University
% AUTHOR: Hua Zhou (hua_zhou@ncsu.edu), Artin Armagan

% check proper input arguments
[n,m] = size(a);
if (numel(b)~=n*m)
    error('a and b have incompatible sizes');
end