MathGroup Archive 2001

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

Search the Archive

Re: right StoppingTest

  • To: mathgroup at
  • Subject: [mg31710] Re: right StoppingTest
  • From: atelesforos at (Orestis Vantzos)
  • Date: Wed, 28 Nov 2001 01:29:32 -0500 (EST)
  • References: <9tvgln$fql$>
  • Sender: owner-wri-mathgroup at

The following code will return a list of the form:
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;
  {{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]==..).

  • Prev by Date: RE: A question about Plot
  • Next by Date: symbolic and perturbative recursivity
  • Previous by thread: right StoppingTest
  • Next by thread: Re: right StoppingTest