I'm working on a class demo of recurrence equations and I want to show the impact of different parameter values using Manipulate. Here's my code:
Manipulate[
ListPlot[
RecurrenceTable[
{s[n + 1] ==
s[n] - \[Gamma]*(i[n]/PP) s[n] + \[Beta] (PP - s[n]) - \[Beta] PP x,
i[n + 1] == i[n] + \[Gamma] (i[n]/PP) s[n] - \[Rho]*i[n] - \[Beta]*i[n],
s[1] == 8000,
i[1] == 2000
},
{s, i},
{n, 1, 10},
],
PlotRange -> All,
Joined -> True
],
{\[Gamma], 0.1, 0.5},
{\[Beta], 0.01, 0.5},
{\[Rho], 0.1, 0.5},
{PP, 10000, 20000},
{x, 0, 1}
]
This code shows the phase space plot of s vs. i. How do I produce a plot of the two series s and i as dependent variables of, say,n?
Bonus question: how do I fix the PlotRange of the ListPlot so that it can fit even the largest curve in phase space?