0
$\begingroup$

I am plotting the pair of recurrence relations:

ClearAll[o, m]
o[j_] := o[j] = 0.7*o[j - 1] + 0.002*o[j - 1]*m[j - 1];
m[j_] := m[j] = 1.2*m[j - 1] - 0.001*o[j - 1]*m[j - 1];
o[0] := 100.;
m[0] := 200.;

DiscretePlot[{o[j], m[j]}, {j, 1, 25}, 
 PlotLegends -> {"Owls", "Mice"}]

This works fine, however, I'd like to view the behavior of the system for larger values of j so as to investigate long-term behavior of the system. When I bump the upper limit of j to something like 80, I get an error that says "Coordinate {-some long decimal expression-} should be a pair of numbers, or a Scaled or Offset form."

How do I fix my code so that I can view large values of j?

$\endgroup$
3
  • $\begingroup$ Please define h[j] $\endgroup$
    – Fortsaint
    Commented Jan 28, 2020 at 14:58
  • $\begingroup$ Sorry, mistype. Was supposed to be m[j] $\endgroup$
    – Alex
    Commented Jan 28, 2020 at 20:27
  • 2
    $\begingroup$ You could I guess clip the output with something like DiscretePlot[{Max[o[j], 10^-5], Min[m[j], 10^5]}, {j, 1, 100}], but basically, this gets crazy really fast and stops outputting numbers that can be plotted (very extremely high or low numbers, like 1.2*10^14798264 for m[120]). $\endgroup$
    – Carl Lange
    Commented Jan 28, 2020 at 21:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.