FAQ/atan - CBU statistics Wiki

Please enter your password of your account at the remote wiki below.
/!\ You should trust both wikis because the password could be read by the particular administrators.

Clear message
location: FAQ / atan

Computing arctans in EXCEL

There are two functions which compute arc tangents (which computes the angle expressed in radians) of a line going from the origin to a co-ordinates in arrays X,Y.

Syntax:

P = atan2(Y,X) or P = atan(X/Y)

P = atan2(Y,X) returns an array P the same size as X and Y containing the element-by-element, four-quadrant inverse tangent (arctangent) of the real parts of Y and X. Any imaginary parts of the inputs are ignored.

Elements of P lie in the closed interval [-pi,pi], where pi is the MATLAB floating-point representation of $$\pi$$. atan uses sign(Y) and sign(X) to determine the specific quadrant.

atan2(Y,X) contrasts with atan(Y/X), whose results are limited to the interval [-pi/2, pi/2].