acosd

Inverse cosine of each element, with the result in degrees.

Category: Mathematics > Elementary Math

Syntax

Y = acosd(X)

Returns the result for each element of X.

Description

acosd works element by element. The result is the angle in degrees whose cosine is X, in the range [0, 180], so acosd(0.5) is 60.

Input arguments

X
Numeric array of any size. Complex values are allowed.

Output arguments

Y
Array of the same size as X, in degrees.

Example

Arc cosine in degrees

acosd([1 0.5 0 -1])
Output
ans = 1×4

         0   60.0000   90.0000  180.0000

Notes

For real input outside [-1, 1] MatLivre returns NaN, whereas MATLAB returns a complex value. The input must be floating point.

See also

cosd acos asind rad2deg