Convert cartesian coordinates to polar/cylindrical
[theta, rho] = cart2pol(x, y) [theta, rho, ZZ] = cart2pol(x, y, z)
Cartesian X-coordinate. Must have the same size as y.
Cartesian Y-coordinates. Must have the same size as x.
Cartesian Z-coordinates. Must be a scalar or have the same size as x.
Angular coordinate relative to the X-axis.
Radial coordinate (distance to pole).
Elevation coordinate.
For real scalars, vectors or matrices x and y (Cartesian coordinates), cart2pol(x, y) returns polar theta and rho coordinates.
For real scalars, vectors or matrices x, y and z (Cartesian coordinates), cart2pol(x, y, z) returns cylindrical theta, rho and ZZ coordinates. If z is a scalar then ZZ is expanded to the same size as x.
| Version | Description |
| 2025.1.0 | Introduction in Scilab. |