
%
%          SIR_rhs
%
  function dy = SIR_rhs(t,y,params);

  global N 

  gamma = params(1);
  k = params(2);
  r = params(3);
  delta = params(4);

  S = y(1);
  I = y(2);
  R = y(3);

%
%
  dy = [delta*(N-S) - gamma*k*I*S;
        gamma*k*I*S - (r+delta)*I;
        r*I - delta*R];

%

