MathGroup Archive 2002

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

Search the Archive

Re: Extracting Terminal Value

Is something like this what you're after:

In[1]:= soln = y /.First[NDSolve[{y'[t]==y[t], y[0]==1},
	y, {t,0,10}, StoppingTest->(y[t]>2)]]

Out[1]= InterpolatingFunction[{{0., 0.696495}}, "<>"]

In[2]:= soln[[1, 1, 2]]

Out[2]= 0.696495

In[3]:= soln[soln[[1, 1, 2]]]

Out[3]= 2.00672


Selwyn Hollis
slhollis at

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: RE: RE: Question about Replace
  • Next by Date: Re: Extracting Terminal Value
  • Previous by thread: Extracting Terminal Value
  • Next by thread: Re: Extracting Terminal Value