MathGroup Archive 2002

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

Search the Archive

Re: Extracting Terminal Value

  • To: mathgroup at smc.vnet.net
  • Subject: [mg35783] Re: Extracting Terminal Value
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 31 Jul 2002 01:33:17 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <ai5tr6$bqi$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

findTimeRange[expr_] := 
  First[Union[
      Cases[expr, InterpolatingFunction[___][_], Infinity] /. 
        InterpolatingFunction[a_, b__][_] :> First[a]]]

ff = NDSolve[{y''[x] == -y[x], y[0] == 1, y'[0] == 0}, y[x], {x, 0,
2Pi}]

and the endpoint is:

Last[findTimeRange[ff]]

Regards
  Jens

"W. H. Harker" wrote:
> 
> I am using StoppingTest in NDSolve, as a consequence the
> terminal value of the independent variable is unknown prior
> to NDSolve finishing. How does one extract this number from
> the Interpolation object?


  • Prev by Date: Re: Extracting Terminal Value
  • Next by Date: realtime plotting of points
  • Previous by thread: Re: Extracting Terminal Value
  • Next by thread: random integer weirdness