% Driver file that specifies parameter values, calls ode solver and plots semilog graph of results

tmax=70; % length of time (yrs) to integrate
N=1000000; % population size
Sinit=0.1*N; % initial susceptible population
Iinit=1; % initial infected population
Rinit=N-Sinit-Iinit; % initial recovered/immune population

R0=15;
gamma=365/10; % inverse of average infectious period (yrs)
mu=1/70; % inverse of life expectancy (yrs)
beta=R0*(gamma+mu);

options = odeset('RelTol',1e-6,'AbsTol',1e-12); % solver options
[T,Y] = ode45(@SIRendemic,[0 tmax],[Sinit Iinit Rinit],options,beta,gamma,mu); % solve odes
      
semilogy(T,Y)
xlabel('Time (years)')
legend('S','I','R')




