Biology Reference
In-Depth Information
specify that the time values for which the function values will be
calculated begin at t
¼
0, end with t
¼
10, and contain all points in
between with increments of DT
¼
0.02.
BERKELEY MADONNA is case-insensitive—m and M are treated as
being exactly the same. It is up to you whether to use all lower-case, all
upper-case, or mixed cases. Blank lines do not matter—include as many
or as few as you need to make your equations more readable.
To enter the model dP
ð
Þ
t
¼
rP
ð
t
Þ;
P
ð
0
Þ¼
5
:
3
;
begin typing at the end of
dt
the code that is already there. Enter the following:
d/dt(P) ¼ r*P
init P ¼ 5.3
r ¼ 0.297
The first line is, of course, the model itself. Notice that we have
completely ignored the fact that P
P(t) is a function that depends on
the time variable t—it is understood by default.
¼
We use
5.3. Finally, on the
last line, we give the specific value for r. Run the model by clicking the
Run button in the upper left corner. The graph of the solution will
appear, as in Figure 1-26.
init P to specify the initial condition P(0)
¼
To see the numerical solution as a table of values, click on the
Table button found across from the Run button (the icon depicts two
squares offset from one another). You should be looking at output
similar to Figure 1-27.
To compare the model predictions with the actual U.S. census data, enter
the data from Table 1-1 into a text file (separating the two columns by a
blank space or tabs), and save the file as U.S.Pop.txt. To import this file
into BERKELEY MADONNA, select File
Import Dataset from the main
menu. Navigate to your U.S.Pop.txt file and open it. Click OK in the
Import Dataset dialog box. The data should now appear on the plot.
>
E XERCISE 1-24
Select appropriate values for DT, STARTTIME, and STOPTIME to obtain
the numerical solution for P(t) that:
(a) Contains the values for P(t) at integer time values from t
¼
1to
t
¼
7; and
(b) Allows you to use the numerical solution to obtain the value
P(2.35).
Search WWH ::




Custom Search