Atan2
This block computes the atan2 (u1,u2) function applied to each entry of input matrices u1 and u2.
![]()
Library
MathOperations
Description
The Atan2 block computes the atan2 value of all the elements of the input vector.
The atan2(y,x) function calculates the principal value of the arc tangent of y/x, using the signs of the two arguments to determine the quadrant of the result.
Mixed matrix/scalar input is allowed.
Parameters

| Name | Label | Description | Data Type | Valid Values |
|---|---|---|---|---|
externalActivation | External activation | Number | 0 |
Ports
| Name | Type | Description | IO Type | Number |
|---|---|---|---|---|
Port 1 | explicit | output | 1 | |
y | explicit | input | 1 | |
x | explicit | input | 2 | |
Port 4 | activation | input | externalActivation |
Advanced Properties
| Name | Value | Description |
|---|---|---|
always active | no | |
direct-feedthrough | yes | |
zero-crossing | no | |
mode | no | |
continuous-time state | no | |
discrete-time state | no |