MathGroup Archive 2002

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

Search the Archive

Re: The equivalent of FindRoot for an interpolating function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg37559] Re: The equivalent of FindRoot for an interpolating function
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Tue, 5 Nov 2002 04:59:33 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <apve0r$s00$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

sol = NDSolve[{y'[t] == 1 - y[t], y[0] == 0}, y[t], {t, 0, 20}]
fy = y[t] /. sol[[1]];
FindRoot[fy == 0.99, {t, 1}]

work fine. And you should add an argument to a function
if you ask for an argument.

Regards
  Jens

"Philip M. Howe" wrote:
> 
> Hi Folks,
> 
> I wish to find the value of the independent variable in an
> interpolating function that makes the dependent variable assume some
> value of interest.  For example,
> 
> sol = NDSolve[{y'[t] == 1-y[t], y[0]==0}, y, {t, 0, 20}]
> fy = y/.sol[[1]]
> 
> produces an interpolating function.  I would like to extract the
> value of t that yields a value of 0.99 or 0.9999 (say) for y.  Is
> there a straightforward way of doing this?
> 
> Thanks in advance for the help.
> 
> Regards,
> 
> Phil
> --
> Philip M. Howe
> Program Manager, Stockpile Surety
> Los Alamos National Laboratory
> 
> (505) 665-5332
> (505) 667-9498
> Fax: 505-665-5249
> email pmhowe at lanl.gov
> Mail Stop P945


  • Prev by Date: OOP in Mathematica
  • Next by Date: Re: making a block diagonal matrix
  • Previous by thread: RE: The equivalent of FindRoot for an interpolating function
  • Next by thread: Re: Importing complex numbers into mathematica