Graphics Programs Reference
In-Depth Information
21. Consideraclosedbiologicalsystempopulatedby M number of prey and N
number of predators. Volterra postulated that the two populations are relatedby
the differentialequations
M
=
aM
bMN
N
=−
cN
+
dMN
where a , b , c and d areconstants. The steady-state solutionis M 0 =
/
d , N 0 =
/
b ;
if numbers other than these are introducedinto the system, the populations
undergo periodic fluctuations. Introducing the notation
c
a
y 1 =
M
/
M 0
y 2 =
N
/
N 0
allows ustowrite the differentialequations as
y 1
=
a ( y 1
y 1 y 2 )
y 2 =
b (
y 2 +
y 1 y 2 )
Using a
=
1
.
0
/
year, b
=
0
.
2
/
year, y 1 (0)
=
0
.
1 and y 2 (0)
=
1
.
0, plot the two popu-
lationsfrom t
=
0to50 years.
22. The equations
u
=−
au
+
av
v
=
cu
v
uw
w
=−
bw
+
uv
known as the Lorenzequations, areencounteredintheory of fluid dynamics.
Letting a
=
5
.
0, b
=
0
.
9 and c
=
8
.
2, solve these equationsfrom t
=
0to10 with
the initialconditions u (0)
=
0, v (0)
=
1
.
0, w (0)
=
2
.
0 and plot u ( t )
.
Repeat the
solutionwith c
=
8
.
3
.
Whatconclusionscan youdrawfrom the results?
MATLAB Functions
[xSol,ySol] = ode23(dEqs,[xStart,xStop],yStart) low-order (probably
third order) adaptive Runge-Kuttamethod. The function dEqs must return the
differentialequations as a column vector (recall that runKut4 and runKut5
require rowvectors). The rangeofintegrationisfrom xStart to xStop with the
initialconditions yStart (also a column vector).
[xSol,ySol] = ode45(dEqs,[xStart xStop],yStart) issimilar to ode23 , but
uses a higher-order Runge-Kuttamethod (probablyfifth order).
Search WWH ::




Custom Search