atan2

Returns the inverse tangent in radians for each element of x and y.

Syntax

R = atan2(x,y)

Inputs

x,y
Any valid scalar | vector | matrix.
Type: double | integer
Dimension: scalar | vector | matrix

Outputs

R
Resulting scalar | vector | matrix

Examples

Simple scalar example:
R = atan2(3,6)
R = 0.463647609000806
Simple matrix example:
R = atan2([50,20,4,-60;1:2:7],[25,40,6,60;7:-2:1])
R = [Matrix] 2 x 4
1.10714871779409  0.463647609000806 0.588002603547568 -0.785398163397448 
0.141897054604164 0.540419500270584 1.03037682652431  1.42889927219073