cart2sph

Purpose

Transform Cartesian coordinates to spherical.

Synopsis

[az,el,r] = cart2sph(x,y,z)

Description

[az,el,r] = cart2sph(x,y,z) transforms data stored in Cartesian, or xy, coordinates to spherical coordinates. x, y, and z must be the same size. az and el are in radians.

See Also

cart2pol, pol2cart, sph2cart

(c) Copyright 1994 by The MathWorks, Inc.