— Function File: [theta, r] = cart2pol (x, y)
— Function File: [theta, r, z] = cart2pol (x, y, z)
Transform cartesian to polar or cylindrical coordinates.
x, y (and z) must be of same shape.
theta describes the angle relative to the x - axis.
r is the distance to the z - axis (0, 0, z).