This MATLAB Live Script demonstrates two models that explain species coexistence in ecosystems: high-order interactions and sort-ranged spatial interactions. The script simulates examples of ecosystems and uses Live Controls to allow the users to interact with the models and observe the changes. The assumptions and equations behind each model are explained in the rich text. The script also explores the power law in the distribution of communities' sizes in the simulated ecosystem. Submitted as part of the MATLAB Online Live Editor Challenge 2018.
Create scripts with code, output, and formatted text in a single executable document.