Hi Theresa,
here are the lines that you would have to execute.
First you define the equations:
sus[i_] := sus[i] = sus[i - 1] - rho sus[i - 1] inf[i - 1];
inf[i_] := inf[i] = inf[i - 1] + rho sus[i - 1] inf[i - 1] - lambda inf[i - 1];
rec[i_] := rec[i] = rec[i - 1] + lambda inf[i - 1];
These are difference equations. Next you need to define the parameters and the initial state, i.e. how many infected, recovered and susceptible there are at time 1.
sus[1] = 0.95; inf[1] = 0.05; rec[1] = 0; rho = 0.2; lambda = 0.1;
The actual calculation is done like this:
tcourse = Table[{sus[i], inf[i], rec[i]}, {i, 1, 100}];
Last but not least you want to plot everything:
ListPlot[Transpose[tcourse]]
That is it. You can, of course, put everything into one cell. The respective notebook is attached for your convenience.
Cheers,
Marco
Attachments: