Compute four-quadrant arctangent
Motor Control Blockset / Controls / Math Transforms
The atan2 block performs the four-quadrant arctangent on two real numbers.
This equation describes how the block computes the four-quadrant arctangent
A — y-coordinate value (real number)
Real number on the y-axis that you provide as input to the block.
B — x-coordinate value (real number)
Real number on the x-axis that you provide as input to the block.
θ — Angle represented by arctangent
Angle represented by arctangent. This is the angle made by a vector from the origin to a specified point (x,y) with the positive x-axis.
The following figure shows the representation of input values A, B, and arctangent on the x-y coordinate plane.
Output unit — Unit of output values
Radians (default) |
Unit of the output values.
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Design and simulate fixed-point systems using Fixed-Point Designer™.
Introduced in R2020a