JSp2Cart:

Path: Math/Analysis

% Jacobian for converting from spherical to  cartesian coordinates
 Computes the Jacobian for converting from spherical to  cartesian coordinates.
 Spherical coordinates are defined as [r,theta,phi] where phi is the angle from
 the +z axis and theta is the angle from +x in the xy-plane.

   x = r*cos(theta)*sin(phi)
   y = r*sin(theta)*sin(phi)
   z = r*cos(phi)

--------------------------------------------------------------------------
   Form:
   jC = JSp2Cart( s )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   s	            (3,1)  Spherical coordinates [r,theta,phi]

   -------
   Outputs
   -------
   jC            (3,3)  Jacobian from spherical to cartesian
                          [ ¸x/¸r ¸x/¸theta ¸x/¸phi ]
                          [ ¸y/¸r ¸y/¸theta ¸y/¸phi ]
                          [ ¸z/¸r ¸z/¸theta ¸z/¸phi ]

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

Back to the Math Module page