[More computation problem] In lab on Monday, professor Aaron discussed the inherent inaccuracies and imprecisions when you use computers to solve mathematical problems. For most ecological models we don’t have analytical solutions, so we must rely upon our sometimes-innaccurate and -imprecise computational tools. In professor Aaron’s lecture notes he showed pseudocode on how to build a solver on page 4 from here: link. What I woudl like to do is for you to use an equation for which we know the analytic solution, the logistic equation, and then write your own solver to see how accurate it is. The solution to logistic equation is \[N(t) = \frac{KN(0)e^{rt}}{K + N(0)\left(e^{rt} - 1\right)}.\] Write a solver like professor Aaron and use \(\Delta t = 1, 0.1, 0.01,0.001\). For the sake of standardization across groups, use the following prameter values: \(K = 10, r = 1, N(0) = 0.1\).
[More ecological problem] 1. Please recreate Figure 9.7 from your
text. Make the figures look tidy, and include a vector field and
nullclines. Make up your own prameter values but also look for some
guidance within the book if you don’t know whenere to start.
If you want to create a multi-panel plot, then use the function
par()
and set the argument mfrow = c(n, m)
with n
being the number of rows and m
being
the number of columns (e.g., par(mfrow = c(2, 3))
creates a
plot with 2 panels for rows and 3 columns).
There is often a lot of white space as a default around
plot()
. You can control that with
mar = c(a, b, c, d)
) as an argument in par()
.
a
—d
respectfully adjust the whitespace at the
bottom, left, top, and right of each panel.