function x = cotd(x)
%MATLAB Code Generation Library Function

%   Copyright 2002-2015 The MathWorks, Inc.
%#codegen
coder.replace;

eml_invariant(nargin > 0,'MATLAB:minrhs');
eml_invariant(isfloat(x),'Coder:toolbox:unsupportedClass',mfilename,class(x));
x = coder.internal.applyScalarFunctionInPlace(mfilename,@localCotD,x);

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

function x = localCotD(x)
coder.inline('always');
x = coder.internal.recip(tand(x));

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