atan2

Returns the four quadrant inverse tangent (in radians) for each element pair of the arguments.

Syntax

R = atan2(y,x)

Inputs

y
The opposite leg of a triangle.
Dimension: scalar | vector | matrix
x
The adjacent leg of a triangle.
Dimension: scalar | vector | matrix

Outputs

R
The angle result (in radians).

Examples

Scalar inputs:
R = atan2(1,-sqrt(3))
R = 2.61799388
Matrix inputs:
R = atan2([2,-3;4,-5],[-3,4;5,-6])
R = [Matrix] 2 x 2
  2.55359  -0.64350
  0.67474  -2.44685