0

I want to produce a Next-maximum-plot, i.e., I want to plot all local maxima $m_{i+1}$ against the local maximum $m_i$ in order to check for chaotic behavior.

In particular, I have the following code:

(*Parameters*)eps = 1.4434; m = 0.3; c11 = 0.1732; maxCellMeasure = \
0.1;
(*PDEs*)
pde11 := 
  D[pp[t, x], t] == 
   0.05*Laplacian[pp[t, x], {x}] + 
    pp[t, x]*(1 - c11*pp[t, x] - z[t, x]/(1 + pp[t, x]^2));
pde21 := D[z[t, x], t] == 
   0.05*Laplacian[z[t, x], {x}] + 
    z[t, x]*(eps*pp[t, x]/(1 + pp[t, x]^2) - m);
(*Initial conditions*)
lo = 98;
hi = 102;
domlen = 200;
ic11[x_] := Which[x > lo && x < hi, 6, True, 0];
ic21[x_] := Which[x < hi && x > lo, 0.5, True, 1/c11];
(*Numerical approximation using NDSolve with zero-flux boundary \
conditions*)
{solp, solz} = 
 Monitor[NDSolve[{pde11, pde21, z[0, x] == ic11[x], 
    pp[0, x] == ic21[x]}, {pp, z}, {t, 0, 1000}, {x, 0, domlen}, 
   EvaluationMonitor :> (monitor = Row[{"t = ", CForm[t]}])], monitor]

Hence, first I need to find the local maxima of say solp and then I need to plot all maxima $m_{i+1}$ against $i_t$.

I think the solution should be pretty straight forward. I have checked EventLocator, but I wasn't able to figure out how to apply it on my code.

Thank you for any help!

gumpel
  • 145
  • 6
  • Is $i_t$ the maximum value over all $x$ for the given $t$? – C. E. Sep 07 '19 at 15:37
  • $i_t$ is the $t$th local maximum. I guess something like $m_i$ would be more intuitive to understand (I'll edit it). So I have only one $x$ for a given $t$ and I am searching for the local maxima. So I want to plot subsequent maxima, i.e., local maximum 2 against local maximum 1, local maximum 3 against local maximum 2... – gumpel Sep 07 '19 at 21:04
  • @C.E. So I basically need two Lists of length $n-1$ if $n$ ist the number of local maxima. One array contains the local maxima $1$ until $n-2$ and the other one contains the local maxima $2$ until $n-1$. And then I want to plot the lists against each other. Any idea? – gumpel Sep 09 '19 at 04:23

0 Answers0