function ellipsePlot(p,xPlot,colorPlot)
% Plot part of an ellipse
% ellipse is controlled by parameters p
% xPlot specifies the x-coordinates
% colorPlot is a string specifying the symbol & color
% used to plot the curve.
% This function is used by ellipticalOrbit.m
% K. Ming Leung, 04/28/03

aa=p(1);
bb=p(2)*xPlot+p(4);
cc=p(3)*xPlot+p(5)-xPlot.*xPlot;
rr=sqrt(bb.*bb-4*aa*cc);
yPlot=(-bb+rr)/(2*aa); 
plot(xPlot,yPlot,colorPlot); 


