Mathematics & Science
Learning Center |
|||
Applications of Differential EquationsPopulation Dynamics(continued from last page...) We need to plug our value of k back into malthus. Since it's already in the form {{k -> 0.0198602}} we almost have what we need, i.e. a replacement rule. The only trouble we have is that it's buried a little too deep within braces, We can strip these away as we learned when we first came up with the [[1,1,2]] trick. Here we actually have an easier scenario. We wish to simply drill into the matrix one level down, so we pull out its first row using the [[1]] command. This leads us to the command: malthus = malthus /. %[[1]] Remember, the percent sign always refers to the previous output in Mathematica, in this case the solution we found for k. The [[1]] drills down a level into this solution, removing the unwanted outer braces.) Let's go see what this produces... |
|||
ODE Laboratories: A Sabbatical Project by Christopher A. Barker ©2017 San Joaquin Delta College, 5151 Pacific Ave., Stockton, CA 95207, USA e-mail: cbarker@deltacollege.edu |