# MATLAB Inverse Cosine

This tutorial will discuss finding the inverse cosine of value using the `acos()` and `acosd()` functions in MATLAB.

## MATLAB Inverse Cosine

We can use the `acos()` and `acosd()` functions of Matlab to find the inverse cosine of a value. The `acos()` function returns the inverse cosine of a value in radians, and the `acosd()` function returns the inverse cosine of a value in degrees.

The `acos()` and `acosd()` function accepts inputs in real and in complex form. If the input value is real and falls within a -1 to 1 interval, the function will return values within the interval of 0 to pi.

If the input value is real and falls outside the interval of -1 to 1 and for complex values, the function will return complex values. For example, let’s find the inverse cosine of a value in radians and degrees.

See the code below.

``````clc
clear

degree_out = acosd(0.5)
``````

Output:

``````radian_out = 1.0472
degree_out = 60.000
``````

In the above code, we used a 0.5 value, and we can see in the output that the result is returned both in radian and degrees. We can also find the inverse cosine of a vector containing multiple values, and the values can be real or complex.

The `acos()` and `acosd()` will return a vector containing the inverse cosine of each value present in the input vector. For example, let’s create a vector with multiple values and find the inverse cosine of each value.

See the code below.

``````clc
clear

values = [0 0.5 0.7 0.9]
degree_out = acosd(values)
``````

Output:

``````values =

0    0.5000    0.7000    0.9000