Compares the relative motion predicted by propagation of the discrete state-space system with the motion predicted by Hills equations.
Since version 7.
------------------------------------------------------------------------
See also AC, Plot2D, Mag, DiscreteHills, HillsEqns
------------------------------------------------------------------------
dT = 20;
t = 0:dT:10000;
x0 = [1; 1; 0; 0; 0; 0];
w0 = 0.001;
aC = zeros(3,length(t)-1);
xDisc = DiscreteHills( x0, w0, aC, dT );
xHE = HillsEqns( x0, w0, t, 1 );
errorX = xDisc - xHE;
Plot2D( t, xDisc, 'Time', 'DiscreteHills Output')
Plot2D( t, xHE, 'Time', 'HillsEqns Output')
Plot2D( t, Mag(errorX), 'Time', 'Error Magnitude')