Mathematica noob issues here. So I've got a system of recurrence equations, and following suggestions in other posts,(Plotting two recursive functions) I have the following:

α1 = 1.2;
β1 = -0.001;
α2 = 1.3;
β2 = -0.002;
θ0 = 150;
p0 = 200;

a[j_] := a[j + 1] = α1*a[j] + β1*a[j]*b[j];
b[j_] := a[j + 1] = α2*b[j] + β2*a[j]*b[j];
a[0] := θ0;
b[0] := p0;

DiscretePlot[{a[j], b[j]}, {j, 0, 20}]

This worked and produced a plot. However, When I try to change the variable values to try different coefficients/initial conditions, I run it and get the same plot back. Doesn't matter how I change the values, I keep getting the same thing.

What's the issue?

  • 1
    $\begingroup$ use ClearAll[a,b] as the first line in your code block? $\endgroup$
    – kglr
    Jan 27 '20 at 22:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.