function y = any(x,dim)
%MATLAB Code Generation Library Function

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

coder.internal.allowHalfInputs;
eml_invariant(nargin > 0,'MATLAB:minrhs');
eml_invariant(coder.internal.isBuiltInNumeric(x) || isa(x,'half') || ...
    ischar(x) || islogical(x), ...
    'Coder:toolbox:unsupportedClass','any',class(x));
if nargin < 2
    y = coder.internal.allOrAny('any',x);
else
    coder.internal.prefer_const(dim);
    y = coder.internal.allOrAny('any',x,dim);
end
