version 0.5 (308 KB) by Peter Brady
This project show cases how to use Object Oriented Programming in MATLAB to do dynamic population models in a scalable, flexible framework


Updated 17 May 2021

From GitHub

View License on GitHub

Dynamic Population Models with MATLAB Object Oriented Code

This code is what was presented for the Australian AgTech Webinar on 16th March 2021. It showcases how to stack together objects to create a world in which plants grow, herbivores eat and are eaten by carnivores. The key is that this object approach and the world framework is flexible and extensible. For example, the system can be adapted to model fishing fleets and fish populations, or harvest strategies for logging operations.

Screen shot of simulation


To Run:

  1. Open the MATLAB® Project prj file
  2. grassLivesForever.m: for a simple development version where the grass lives forever
  3. grassDies.m: for the final version where the grass is consumed and takes time to regrow

MathWorks Products (https://www.mathworks.com)

This demonstration was developed in R2021a but should be quite backward compatible. The following are recommended products as simulations such as this are often placed into a much larger Monte Carlo framework.


The license for this population modelling code is available in the LICENSE.TXT file in this repository.

Community Support

MATLAB Central

Copyright 2021 The MathWorks, Inc.

Cite As

Peter Brady (2022). oop-population-dynamics (https://github.com/mathworks/oop-population-dynamics/releases/tag/0.5), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2021a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.