pol2cart
Convert polar/cylindrical coordinates to cartesian
Syntax
[XX, YY] = pol2cart(theta, rho) [XX, YY, ZZ] = pol2cart(theta, rho, z)
Arguments
- theta
Angular coordinate relative to the X-axis. Must have the same size as
rho
.- rho
Radial coordinate (distance to pole). Must have the same size as
theta
.- z
Elevation coordinate. Must be a scalar or have the same size as
theta
.- XX, YY, ZZ
Cartesian coordinates.
Description
For real scalars, vectors or matrices theta
and rho
(polar coordinates), pol2cart(theta, rho)
returns Cartesian XX
and YY
coordinates.
For real scalars, vectors or matrices theta
, rho
and z
(cylindrical coordinates), pol2cart(theta, rho, z)
returns Cartesian XX
, YY
and ZZ
coordinates. If z
is a scalar then ZZ
is expanded to the same size as theta
.
Examples
theta = 0:%pi/2:%pi; rho = [2 4 6]; [x, y] = pol2cart(theta, rho) z = 5:7; [XX, YY, ZZ] = pol2cart(theta, rho, z)
See also
- cart2pol — Convert cartesian coordinates to polar/cylindrical
- polarplot — 極座標プロット
- graypolarplot — 曲面の極座標2次元カラープロット
History
バージョン | 記述 |
2025.1.0 | Introduction in Scilab. |
Report an issue | ||
<< cart2pol | Conversions | acos >> |