SIR Math Model of Virus Spread (Coronavirus or other)

Introductory model of infectious disease spread. Social distancing and social isolation affects beta (transmission rate).

Download
Download

You are now following this Submission

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Cite As

Tom Beekhuysen (2026). SIR Math Model of Virus Spread (Coronavirus or other) (https://www.mathworks.com/matlabcentral/fileexchange/74697-sir-math-model-of-virus-spread-coronavirus-or-other), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired: SIR model

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.20

Updated file.

Download
1.0.19

Updated file.

Download
1.0.18

Updated preview.

Download
1.0.17

Updated preview.

Download
1.0.16

Exported to R2018a.

Download
1.0.15

Exported to version R2018a.

Download
1.0.14

Corrected parameter.

Download
1.0.13

Preview image.

Download
1.0.12

Updated beta and gamma based on more recent data.

Download
1.0.11

corrected typo.

Download
1.0.10

Updated description.

Download
1.0.9

Corrected typo.

Download
1.0.8

Added notes in description and model about specific parameters to covid19. Typical individual is infectious 2-4 weeks. Rate of recovery is 25 days (3 weeks plus 4 days safety factor). Reported reproduction number is 2-3 (2.5).

Download
1.0.7

Added note in slx model about when beta<gamma (infection rate is less than recovery rate) spread stops.

Download
1.0.6

updated preview image

Download
1.0.5

Exported to earlier version; 2018a.

Download
1.0.4

Update image.

Download
1.0.3

Updated text

Download
1.0.2

Added system of odes to description and updated slx file

Download
1.0.1

Corrected typo

Download
1.0.0

Download