pol2cart
Converts polar or cylindrical coordinates to Cartesian.
Syntax
[x,y]=pol2cart(theta,r)
[x,y,z]=pol2cart(theta,r,z)
[x,y]=pol2cart(P)
[x,y,z]=pol2cart(P)
C = pol2cart(...)
Inputs
- theta,r,z
- Polar coordinates.
- P
- An array or matrix containing polar or cylindrical coordinates.
Outputs
- x,y,z
- Cartesian coordinates.
- C
- An array or matrix containing Cartesian corrdinates.
Examples
C=pol2cart(pi/3,2)
C = [Matrix] 1 x 2
1.00000 1.73205
[x,y,z]=pol2cart(pi/6,3,4)
x = 2.59807621
y = 1.5
z = 4
Comments
When a matrix contains multiple points the coordinates are stored by row.