%model equations for simulating the scaled SIWR model
function dxdt = siwrODE(t,x,params)
%x(1) = susceptibles s
%x(2) = infecteds i
%x(3) = water w
%x(4) = recovered r

mu = 0;
betaI = params(1);
betaW = params(2);
gamma = 0.25;
squiggle = params(3);
k = params(4);

dxdt = zeros(4,1); %column vector for the state variables - can change to (3,1) and ditch the recovereds as well

dxdt(1) = mu - betaW*x(1)*x(3) - betaI*x(1)*x(2) - mu*x(1);
dxdt(2) = betaW*x(1)*x(3) + betaI*x(1)*x(2) - gamma*x(2) - mu*x(2);
dxdt(3) = squiggle*(x(2) - x(3));
dxdt(4) = gamma*x(2) - mu*x(4);


