MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: right StoppingTest

  • To: mathgroup at
  • Subject: [mg31735] Re: right StoppingTest
  • From: "Borut L" <borut at>
  • Date: Thu, 29 Nov 2001 00:14:06 -0500 (EST)
  • References: <9tvgln$fql$> <9u20bm$ipa$>
  • Sender: owner-wri-mathgroup at


I recognized just later on I hadn't given the initial conditions. I forgot
to mention that the equations describe a real physical system of a disease
diffusing among population sorted into three classes: the immune i, the sick
o and the one-who-are-all-right-but-can-get-sick d. It follows that

d(o+i+d)/d(time) = 0

I would like to ask why :> is used in StoppingTest, instead of an
ordinary ->?

Thank you,


"Orestis Vantzos" <atelesforos at> wrote in message
news:9u20bm$ipa$1 at
> The following code will return a list of the form:
> {{omax,tmax},{o[t]->-InterpolatingFunction-,...}}
> where omax is the maximum o and tmax the corresponding t:
> Module[{oldO = -\[Infinity], oldT, sol},
>   sol = NDSolve[equs, {o[t], d[t], i[t]}, {t, 0, 10},
>       StoppingTest :> (If[o < oldO, True, oldO = o; oldT = t;
> False])];
>   {{oldO, oldT}, sol}]
> where equs is your ODE system with NUMERIC values for a and b, plus
> proper initial conditions (of the form o[0]==..,d[0]==..,i[0]==..).
> Orestis

  • Prev by Date: Symbolize
  • Next by Date: EPS Export, Wrong characters
  • Previous by thread: Re: right StoppingTest
  • Next by thread: bisection method