function mustBeNonnegative(A)
%MATLAB Code Generation Library Function
%
%   Copyright 2016-2017 The MathWorks, Inc.
%#codegen

coder.internal.allowHalfInputs;
coder.internal.allowEnumInputs;
mustBeNumericOrLogical(A);
mustBeReal(A);
coder.internal.assert( coder.internal.checkAll(@checkNonNegative,A), ...
    'MATLAB:validators:mustBeNonnegative');

%--------------------------------------------------------------------------

function out = checkNonNegative(a)
out = (a >= cast(0,'like',a));

%--------------------------------------------------------------------------
