EGR 103/Spring 2015/Lab 11
Hints for Problem 4
In the differential equation, note that the numerator involves the ratio between your current and maximum population,
and not
Hints for Problem 5
Since this is a second order differential equation, you will want to use the following:
meaning:
To get the derivative of \(y(2)\), you will need to rearrange the equation given in the problem to isolate acceleration. Basically, the equation in the book, in terms of your variables, looks like:
Get an equation for \(\frac{dy(2)}{dt}\) and put that in the second line of your dydt
code.
Also, keep in mind you are tracking both the position and the velocity of the block. That means, among other things, that you need to have two initial conditions (an initial position and an initial velocity) and you need to only plot the first column of the \(yout\) variable that comes out of the ode45
command. Since there are three different damping ratios, you will need to run the ode45
command three different times.