Graphics Programs Reference
In-Depth Information
with the initialconditions
10 3
10 6 m
r (0)
=
R e
+
H
=
R e
=
(6378
.
14
+
772)
×
=
7
.
15014
×
r (0)
=
0
θ
(0)
=
0
˙
10 6 )
10 3 rad/s
θ
(0)
=
v 0 /
r (0)
=
( 6700 )
/
(7
.
15014
×
=
0
.
937045
×
Therefore,
10 6
7
.
15014
×
0
0
0
y (0)
=
.
937045
×
10 3
Solution of Part (2) The function that returns the differentialequations is
_
functionF=fex7
6(x,y)
% Differential eqs. used in Example 7.6.
F = zeros(1,4);
F(1) = y(2);
F(2) = y(1)*y(4)ˆ2 - 3.9860e14/y(1)ˆ2;
F(3) = y(4);
F(4) = -2*y(2)*y(4)/y(1);
The program used for numerical integrationislistedbelow. Note that the inde-
pendent variable t is denotedby x .
% Example 7.6 (Runge-Kutta integration)
x=0;y=[7.15014e6000.937045e-3];
xStop = 1200;h=50;freq=2;
[xSol,ySol] = runKut4(@fex7
_
6,x,y,xStop,h);
printSol(xSol,ySol,freq)
Here is the output:
>> x y1 y2 y3 y4
0.0000e+000 7.1501e+006 0.0000e+000 0.0000e+000 9.3704e-004
1.0000e+002 7.1426e+006 -1.5173e+002 9.3771e-002 9.3904e-004
2.0000e+002 7.1198e+006 -3.0276e+002 1.8794e-001 9.4504e-004
3.0000e+002 7.0820e+006 -4.5236e+002 2.8292e-001 9.5515e-004
Search WWH ::




Custom Search