CartToPol: Transform Cartesian to Polar Coordinates and vice versa
Description
Transform cartesian into polar coordinates.
Usage
CartToPol(x, y)
PolToCart(r, theta)
Arguments
x, y
two vectors with the xy-coordianates to be transformed.
r
a vector with the radius of the points.
theta
a vector with the angle(s) of the points.
Value
PolToCart returns a list of x and y coordinates of the points.
CartToPol returns a list of r for the radius and theta for the angles of the given points.
Details
Angles are in radians, not degrees (i.e., a right angle is pi/2). Use DegToRad to convert,
if you don't wanna do it by yourself.
All parameters are recycled if necessary.