Rectangular to Polar
Purpose
Convert Cartesian coordinates to polar coordinates
Library
Control / Transformations
Description
This block transforms a signal representing rectangular coordinates \([x, y]\) into polar coordinates \([r, \theta]\):
\[\begin{split}r &= \sqrt{x^2 + y^2} \\
\theta &= \text{atan2}(y, x)\end{split}\]
\(\theta\) is calculated in the range \([-\pi, \pi]\).
Example Model
See the example model “Rectangular To Polar”.
Find it in PLECS under Help > PLECS Documentation > List of Example Models.