cotd

Cotangent of an angle given in degrees.

Category: Mathematics > Elementary Math

Syntax

Y = cotd(X)

Returns the cotangent of each element of X, in degrees.

Description

cotd(X) is the cotangent of X degrees. It returns exact values at multiples of 45 degrees where possible, so cotd(45) is 1 and cotd(90) is 0. At multiples of 180 degrees the result is infinite.

Input arguments

X
Numeric array of any size.

Output arguments

Y
Array of the same size as X.

Example

Cotangent in degrees

cotd([45 90 30])
Output
ans = 1×3

    1.0000         0    1.7321

See also

cot tand acotd cosd