lotka_volterra_ode, a MATLAB code which simulates a Lotka-Volterra or predator-prey system of ordinary differential equations (ODE). The code can produce a single solution history for given initial conditions, or display a phase plane describing the solution for multiple initial conditions. This code is derived from Dianne O'Leary's "Scientific Computing with Case Studies".
Interacting populations of rabbits and foxes are represented over time by the variables r(t) and f(t). The relationship beween the populations is modeled by the ODE system:
drdt = 2 r - alpha * r * f
dfdt = - f + alpha * r * t
where alpha is the "encounter" parameter.
The information on this web page is distributed under the MIT license.
lotka_volterra_ode is available in a MATLAB version.
exm, a MATLAB code which contains scripts and data discussed in the electronic textbook 'Experiments with Matlab', by Cleve Moler, including easter, Fast Fourier Transforms, Fibonacci numbers, the fractal fern, the game of Life, magic matrices, the Mandelbrot set, Morse code, Music, Ordinary Differential Equations, the page rank algorithm, planetary orbits, predator prey equations, the shallow water equations, Sudoku puzzles.
fd_predator_prey, a MATLAB code which applies the finite difference method (FDM) to a predator-prey system with time dependence and no spatial variation.
fd1d_predator_prey, a MATLAB code which implements the finite difference method (FDM) for predator-prey system with time and 1D spatial dependence, by Marcus Garvie.
fd2d_predator_prey, a MATLAB code which implements the finite difference method (FDM) for a predator-prey system with time and 2D spatial dependence, by Marcus Garvie.
fem2d_predator_prey_fast, a MATLAB code which implements the finite element method (FEM) for a predator-prey system with time and 2D spatial dependence, in an arbitrary triangulated region, with a variety of boundary conditions, incorporating some optimizations, by Marcus Garvie.
lotka_volterra, a FreeFem++ code which models the time evolution of the distribution of predator and prey species over a 2D region.
predator_prey_ode, a MATLAB code which sets up a system of ordinary differential equations (ODE) for a Lotka-Volterra predator prey model, for which a limit cycle exists.
predator_prey_ode_period, a MATLAB code which sets up a system of ordinary differential equations (ODE) for a Lotka-Volterra predator prey model in order to estimate the period of the limit cycle. The computation involves the Lambert W function.