This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Inverse tangent in radians


Y = atan(X)



Y = atan(X) returns the Inverse Tangent (tan-1) of the elements of X in radians. The function accepts both real and complex inputs.

  • For real values of X, atan(X) returns values in the interval [-π/2, π/2].

  • For complex values of X, atan(X) returns complex values.


collapse all

Find the inverse tangent of a value.

ans = 0.6747

Find the inverse tangent of the elements of vector x. The atan function acts on x element-wise.

x = [0.5i 1+3i -2.2+i];
Y = atan(x)
Y = 1×3 complex

   0.0000 + 0.5493i   1.4615 + 0.3059i  -1.2019 + 0.1506i

Plot the inverse tangent function over the interval -20x20.

x = -20:0.01:20; 
grid on

Input Arguments

collapse all

Tangent of angle, specified as a scalar, vector, matrix, or multidimensional array. The atan operation is element-wise when X is nonscalar.

Data Types: single | double
Complex Number Support: Yes

More About

collapse all

Inverse Tangent

The inverse tangent is defined as


Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

See Also

| | |

Introduced before R2006a