function [minval,indx] = min(varargin)
%MATLAB Code Generation Library Function

%   Copyright 2003-2019 The MathWorks, Inc.
%#codegen

coder.internal.allowHalfInputs;
coder.internal.implicitExpansionBuiltin;
coder.inline('always'); % for shrinktypes on indx output
narginchk(1,5);
if nargin == 2
    eml_property('associative','commutative');
end
if nargout <= 1
    minval = coder.internal.minOrMax('min',varargin{:});
else
    [minval,iindx] = coder.internal.minOrMax('min',varargin{:});
    indx = double(iindx);
end
