function ydot=RHSinfct1(t,y) % RHSabalone1 % % 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 animals from the infected population [number] % y(4): P, infectious particles close % to the susceptible population [number] % array indexes of variables nVar=4;iS=1;iI=2;iD=3;iP=4; global PAR % most rates are 1/day ydot=zeros(nVar,1); % time changes of susceptable animals ydot(iS)= - PAR.IPinfect * y(iP) * y(iS)... - PAR.Iinfect * y(iI) * y(iS) ... - PAR.Dinfect * y(iD) * y(iS) ... - PAR.Bmort * y(iS); % time changes of infected animals ydot(iI)= PAR.IPinfect * y(iP) * y(iS)... + PAR.Iinfect * y(iI) * y(iS)... + PAR.Dinfect * y(iD) * y(iS)... - PAR.Imort * y(iI); % time changes of dead infected animals ydot(iD)= PAR.Imort * y(iI) - PAR.DeadDecay * y(iD); % time changes of infectious particles ydot(iP)= PAR.Irelease * y(iI) + PAR.Drelease * y(iD) ... - PAR.IPremove * y(iP);