function rhs=epidemic_rhs(t,y) % the one-population epidemic right hand sides % susceptibles S(t) = y(1) % infectives I(t) = y(2) global alpha beta gamma S = y(1); I = y(2); R = y(3); rhs(1) = alpha*S - beta*I*S; rhs(2) = beta*I*S - gamma*I; rhs(3) = gamma*I; rhs = rhs';