MathGroup Archive 1998

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

Search the Archive

Can't take a value from an InterpolatingFunction.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg13622] Can't take a value from an InterpolatingFunction.
  • From: iioannou at u.washington.edu (I. Ioannou)
  • Date: Fri, 7 Aug 1998 03:08:23 -0400
  • Organization: University of Washington, Seattle
  • Sender: owner-wri-mathgroup at wolfram.com

Hi all,

I've set up and solved a system of two differential equations, according
to the following prescription;

  solution = 
    NDSolve[{r'[t] == .....equation1......,
             p'[t] == .....equation2......,
             r[0] == 0.,p[0] == p0}, {r, p}, {t, 0, 0.2},
             MaxSteps \[Rule] 300000, Method \[Rule] Automatic]

All has worked very nicely. However, I need now to take the value of r
at t=0.2 and I can't seem to be able to do it. 

I should point out that the Book suggestion r[0.2] /. % doesn't work,
because the above statement is within a For loop and is run many times.
(to collect various r[0.2] values that come out) So, it's within one
big cell.

The error reported sais that solution is not a valid lookup table. Well,
from what I understand, it's a set (?) of two InterpolatingFunctions.
If I knew what kind of entity solution is, I might be able to figure
how to instruct Mathematica to let me access r[0.2].

Any help appreciated, thanks, John

-- 
      Ioannis   I    Ioannou                   phone: (206)-543-1372
      g-2 group, Atomic Physics                fax:   (206)-685-0635
      Department of Physics           
      University of Washington        e-mail: iioannou at u.washington.edu


  • Prev by Date: Mathematica dies with bus error---known bug?
  • Next by Date: Re: Publicon Problems
  • Previous by thread: Re: Mathematica dies with bus error---known bug?
  • Next by thread: Re: Can't take a value from an InterpolatingFunction.