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

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

eml_invariant(nargin > 0,'MATLAB:minrhs');
eml_invariant(isfloat(x),'Coder:toolbox:unsupportedClass',mfilename,class(x));
if isreal(x)
    % Error if any -1 < x(k) < 1.
    if coder.internal.isDomainError(x,@gt,-ones('like',x),@and,@lt,ones('like',x))
        coder.internal.error('Coder:toolbox:ElFunDomainError',mfilename);
    end
end
x = coder.internal.applyScalarFunctionInPlace(mfilename,@localAsecD,x);

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

function x = localAsecD(x)
coder.inline('always');
radToDeg = coder.const(180/pi);
x = radToDeg.*coder.internal.scalar.asec(x);

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