function [s,l] = bounds(a,varargin)
%MATLAB Code Generation Library Function

%   Copyright 2018 The MathWorks,Inc.
%#codegen

narginchk(1,3);

if nargin <= 1
    s = min(a);
    l = max(a);
elseif nargin == 2
    s = min(a,[],varargin{1});
    l = max(a,[],varargin{1});
else
    s = min(a,[],varargin{1},varargin{2});
    l = max(a,[],varargin{1},varargin{2});
end