function maxLinearValidate(val, ParamName)
%MAXLINEARVALIDATE Make sure we are passing a valid bound on memory.

%   Copyright 2020 The MathWorks, Inc.

if ~isscalar(val) || (val < 0) || ~isreal(val) || (floor(val) ~= val)
    error(message('optimlib:warmstart:InvalidMaxLinearProperty', ParamName));
end

end

