MathGroup Archive 2002

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

Search the Archive

Re: Extracting Terminal Value


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