Interpolation
can make an InterpolatingFunction
periodic with the option PeriodicInterpolation
. Can we make an InterpolatingFunction
that already exists periodic, perhaps the output of NDSolve
?
For example, this predator-prey model has the following limit cycle:
per = 11.961276218870646`;
sol = NDSolve[{
n'[t] == (1 - n[t]/3.5) n[t] - (n[t] p[t])/(1 + n[t]),
p'[t] == (-1 + (2 n[t])/(1 + n[t])) p[t],
n[0] == 2.356251381534703`, p[0] == 1.1409965294442128`},
{n, p}, {t, 0, per}][[1]];
Plot[Evaluate[{n[t], p[t]} /. sol], {t, 0, per}]