File Exchange

image thumbnail

SEIRS epidemic model

version 1.2.0 (1.65 MB) by milan batista
Simulation of an epidemic by classical deterministic models: SI, SIS, SIR, SIRS, SEIR, SEIRS

56 Downloads

Updated 08 May 2020

View License

The contribution contains the class epidemic by which one can simulate the evaluation of an epidemic by several classical deterministic epidemic models without vital dynamics:
SI -- Susceptible->Infective
SIS -- Susceptible->Infective->Susceptible
SIR -- Susceptible->Infective-Removed
SIRS -- Susceptible->Infective->Removed->Susceptible
SEIR -- Susceptible->Exposed->Infective->Removed
SEIRS -- Susceptible->Exposed->Infective->Removed->Susceptible

Usage
obj = epidemic(model, varargin)
model -- {'SI,'SIS','SIR','SIRS', SEIR','SEIRS'}
'beta',beta -- contact frequency (>0) - for all models
'gamma',gamma -- removal frequency (>0) - for all models except SI
'sigma',sigma -- incubation frequency (>0) - for SEIR and SEIRS models
'xi', xi -- returning frequency (>0) - for SIS, SIRS and SEIRS models
'tend',tend -- end time (>0, defTime)
'dt',dt -- integration step (>0, def 0.1)
'N',N -- population size (>0, def 1000)
'I0',I0 -- initial number of infectious (>=0, def 1)
'E0',E0 -- initial number of exposed (>=0, def 0)

Methods
run(obj,varargin) -- run simulation
'tend',tend -- end time (>0, def ...)
'dt',dt -- integration step (>0, def 0.1)
'N',N -- population size (>0, def 1000)
'I0',I0 -- initial number of infectious (>=0, def 1)
'E0',E0 -- initial number of exposed (>=0, def 0)
plot(obj,varargin) -- plot result of simulation
'all',{'on','off'} -- plot all populations or just total cases (def 'on')
'new',{'on','off'} -- new plot (def 'on')
'total' ,{'on','off'} -- plot also total cases if 'all','on'

Example:
aa=epidemic('SEIR','N',200,'beta',1.9,'gamma',1/5,'sigma',1/7,'tend',60);
run(aa)
plot(aa)

No parameterization function is provided for actual data.

DISCLAIMER: Software is for education and not for medical or commercial use. Use it at your own discretion.

Cite As

milan batista (2020). SEIRS epidemic model (https://www.mathworks.com/matlabcentral/fileexchange/75321-seirs-epidemic-model), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

Updates

1.2.0

Major revision

1.1.3

Update description

1.1.2

Update description

1.1.1

Update description

1.1.0

Correct equations for SEIR and SEIRS. Add SIS model.

1.0.3

Correct calculation of accumulated total cases

1.0.2

Update tags

1.0.1

Minor updates

MATLAB Release Compatibility
Created with R2020a
Compatible with any release
Platform Compatibility
Windows macOS Linux

SEIRS_v03

SEIRS_v03/data

SEIRS_v03