GravityNormalized:

% Compute the gravitational acceleration in cartesian coordinates. 
 Acceleration vectors are a, [ aX;aY;aZ ]. This model only handles
 normalized coefficients. It can handle any order model. 

 This function uses persistent memory. You will need to clear when
 you change nZ or nM. nZ can be a struct with the gravity model.
 struct('nN', 'nM', 's', 'c', 'j', 'mu', 'a');

 Type GravityNormalized for the 4x4 example given in Gottlieb.
--------------------------------------------------------------------------
   Form:
   [aG, aS, aZ, aT] = GravityNormalized( r, nZ, nM, s, c, j, mu, a )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   r           (3,:)    Position vector
   nZ          (1,1)    Highest zonal harmonic (m = 0) (can be a struct
                        (empty gives the max #) 
   nM          (1,1)    Highest sectorial and tesseral harmonic 
                        (empty gives the max #) 
   s           (:,:)    S terms
   c           (:,:)    C terms
   j             (:)    m = 0 terms
   mu          (1,1)    Spherical gravitational constant
   a           (1,1)    Planet radius

   -------
   Outputs
   -------
   aG           (3,:)   Total gravitational acceleration km/sec^2
   aS           (3,:)   Spherical term                   km/sec^2
   aZ           (3,:)   Zonal term                       km/sec^2
   aT           (3,:)   Tesseral term                    km/sec^2

--------------------------------------------------------------------------
  Reference:   Bond, V. R. and M. C. Allman (1996.) Modern Astrodynamics.
               Princeton. pp. 212-213.
               Gottlieb, R. G., "Fast Gravity, Gravity Partials,
               Normalized Gravity, Gravity Graident Torque and Magnetic
               Field: Derivation, Code and Data, NASA CR 188243, February,
               1993.
--------------------------------------------------------------------------
 See also AGravityC.
--------------------------------------------------------------------------

Children:

Common: General/CellToMat
Common: General/MatToCell
Common: General/Watermark
Common: Graphics/NewFig
Common: Graphics/Plot2D
Common: Graphics/PltStyle
Orbit: GravityModels/NormalizationMatrix
Orbit: GravityModels/UnnormalizeGravity
Orbit: OrbitMechanics/AGravityC