MATLAB Function Reference
  Go to function:
    Search    Help Desk 
sph2cart    See Also

Transform spherical coordinates to Cartesian

Syntax

Description

[x,y,z] = sph2cart(THETA,PHI,R) transforms the corresponding elements of spherical coordinate arrays to Cartesian, or xyz, coordinates. THETA, PHI, and R must all be the same size. THETA and PHI are angular displacements in radians from the positive x-axis and from the x-y plane, respectively.

Algorithm

The mapping from spherical coordinates to three-dimensional Cartesian coordinates is:


See Also

cart2pol    Transform Cartesian coordinates to polar or cylindrical

cart2sph    Transform Cartesian coordinates to spherical

pol2cart    Transform polar or cylindrical coordinates to Cartesian



[ Previous | Help Desk | Next ]