function ydot=RHS_SEIR(t,y) % RHScovi % % define the RHS of the model equations. % variables are % y(1): S, susceptible, uninfected individuals [number] % y(2): I, infected individuals [number] % array indexes of variables nVar=4;iS=1;iE=2;iI=3;iR=4; global PAR % most rates are 1/day ydot=zeros(nVar,1); % EQUATIONS % Time changes of susceptable individuals, ydot(iS)= - PAR.Iinfect * y(iI) * y(iS); % Time changes of Exposed animals ydot(iE)= PAR.Iinfect * y(iI) * y(iS)-PAR.inc*y(iE); % Time changes of Infected animals ydot(iI)= PAR.inc*y(iE)- PAR.rec*y(iI)-PAR.Imort * y(iI); % Time changes of Recovered animals ydot(iR)= PAR.rec*y(iI);