Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Re: final timestep using StoppingTest

  • To: mathgroup at smc.vnet.net
  • Subject: [mg24574] Re: final timestep using StoppingTest
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Tue, 25 Jul 2000 00:56:07 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <8lgsae$2cd@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

with

sol = NDSolve[{x''[t] == -x[t], x[0] == 1, x'[0] == 0}, x[t], {t, 0,
2Pi}, 
    StoppingTest -> x[t] < 0]

Head[First[x[t] /. sol]][[1]]

I got

{{0., 1.68799}}

is this OK for you ?

You can get all time values by

Head[First[x[t] /. sol]][[3]]

Regards
  Jens

Michael Gilchrist wrote:
> 
> Hi,
> 
> I am using NDSolve with StoppingTest to stop NDSolve when the
> solutions become trivial.  I have, however, a problem.  I want to
> know at what value of the independent variable (e.g. t) that the
> StoppingTest evaluates True and exits NDSolve.  I am getting very
> frustrated.  I try pull this info from the InterpolatingFunction, but
> it won't allow me to extract the part of the answer with the bounds
> of the independent variable.


  • Prev by Date: Re: More about l`Hopital`s rule
  • Next by Date: Re: Windows 9X or Linux?
  • Previous by thread: final timestep using StoppingTest
  • Next by thread: controlling evaluation