Plot3DEllipsoids:

Path: FormationFlying/Collision

% Plot collision ellipsoids in 3D
 Plots ellipsoids given the ellipsoid centers and matrices  for 1 or 2 spacecraft. Selects nPlot points from the trajectory.
 Has a built-in demo. Ellipsoids are created with the same dimenensions
 in X and Z but elongating with time along Z.
--------------------------------------------------------------------------
   Form:
   Plot3DEllipsoids( xhat, Shat, nPlot )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   
   xhat      {m}(3,n)      Ellipsoid centers, for both spacecraft
   Shat      {m}(3,3,n)    Ellipsoid size matrices, for both spacecraft
   nPlot           (p)     Number of ellipsoids to plot, defaults to 50

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