MATLAB Examples

Contents

Example

clear all,close all;clc;

Basic model

Npop= 500; % population
alpha = 7.5e-3 ; %  "zombie destruction" rate.
beta = 5e-3; % "zombie creation" rate.
zeta= 9e-2; % zombie resurrection rate
delta= 1e-4; % susceptibles death rate
tmax = 100; % max duration of the simulation (non-dimensional)
dt = 0.005; % time step
plotOption = 1; % 1 to plot the data, 0 otherwise


[SRZ,t] = zombies(Npop,alpha,beta,zeta,delta,tmax,dt,plotOption);

Impulsive eradication

beta = 4e-3; % "zombie creation" rate.
k = 0.3; % kill rate
Nraid =6; % Number of raids
[SRZ,t] = erad(Npop,alpha,beta,zeta,delta,k,Nraid,tmax,dt,plotOption);
Zombies have been eradicated (until now...).