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

coder.internal.allowHalfInputs;
coder.internal.allowEnumInputs;
mustBeNumericOrLogical(A);
allNonZero = coder.internal.checkAll(@checkNonZero,A);
coder.internal.assert(allNonZero,'MATLAB:validators:mustBeNonzero');

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

function out = checkNonZero(a)
out = (a ~= cast(0,'like',a));

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