Main Content

Polar to Cartesian

Convert polar coordinates to Cartesian coordinates

  • Polar to Cartesian block

Libraries:
Simulink Extras / Transformations

Description

The Polar to Cartesian block transforms the polar coordinates (r, theta) to the Cartesian coordinates (x, y).

The first and second inputs correspond to r and theta, respectively. The angle theta is in radians. The first and second outputs correspond to x and y, respectively.

The polar coordinates (r, theta) describe a point where r is the distance from the origin, and theta is the counterclockwise angle in radians from the positive x-axis. The Cartesian coordinates (x, y) describe the same point with respect to the x-axis and y-axis.

x = r × cos(theta)

y = r × sin(theta)

Ports

Input

expand all

Input signal specifying the r coordinate of the Polar coordinates (r,theta). Both inputs must be real scalars of the same data type.

Data Types: single | double

Input signal specifying the theta coordinate of the Polar coordinates (r,theta). Both inputs must be real scalars of the same data type.

Data Types: single | double

Output

expand all

Output signal specifying the x value in the Cartesian coordinates (x,y).

Data Types: single | double

Output signal specifying the y value in the Cartesian coordinates (x,y).

Data Types: single | double

Version History

Introduced in R2008b