Sph2Cart:

Path: Common/Transform

% Converts spherical coordinates to cartesian.

--------------------------------------------------------------------------
   Form:
   [x, y, z] = Sph2Cart( r, theta, phi )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   r                     (:,:)  Either r or [r;theta;phi]
   theta                 (:)    theta (angle in xy-plane)
   phi                   (:)    phi 

   -------
   Outputs
   -------
   x                     (:,:)  Either x or [x;y;z]
   y                     (:)    y
   z                     (:)    z

--------------------------------------------------------------------------

Back to the Common Module page