function ydot=RHS_SID(t,y) % RHS_SID % % define the RHS of the model equations. % variables are % y(1): S, susceptible, uninfected individuals [number] % y(2): I, infected individuals [number] % y(3): D, dead individuals from the infected population [number] % array indexes of variables nVar=3;iS=1;iI=2;iD=3; global PAR % most rates are 1/day ydot=zeros(nVar,1); % EQUATIONS % Time changes of susceptable individuals, ydot(iS)= - PAR.Dinfect * y(iD) * y(iS); ydot(iI)= PAR.Dinfect * y(iD) * y(iS)- PAR.Imort * y(iI); % time changes of dead infected individuals ydot(iD)= PAR.Imort * y(iI)-PAR.Ddecay*y(iD);