Simulitis (A Coronavirus Simulation)

version 1.1.2 (6.22 KB) by Joshua Gafford
MATLAB code to replicate Washington Post's Coronavirus simulation


Updated 11 Apr 2020

View License

I'm sure by now you've all seen the Washington Post article with the COVID-19 simulation, speaking to the public health benefits of social isolation in the face of a highly infectious disease. If you haven't, here's the article:

Well, out of my quarantine boredom, I recreated this simulation in MATLAB, with more knobs to turn and parameters to play around with. For example, what if some of the carriers can die? What if the disease is Ebola instead (~50% mortality rate)?

This function simulates disease transmission among a set of n carriers, in a confined space, with some proportion of carriers socially isolating themselves. A simple multibody physics model (elastic collision between two equal-mass particles) determines carrier trajectory.

Hopefully this gives you a fun (albeit brief) respite from the doldrums of social isolation!

Cite As

Joshua Gafford (2022). Simulitis (A Coronavirus Simulation) (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018b
Compatible with R2018b and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!