MathGroup Archive 1996

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

Search the Archive

InterpolatingFunction

  • To: mathgroup at smc.vnet.net
  • Subject: [mg4947] InterpolatingFunction
  • From: Noriaki Kinoshita <nk204 at cam.ac.uk>
  • Date: Mon, 7 Oct 1996 02:02:14 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

I have a question about using a InterpolatingFunction obtained
by NDSolve as a usual function.

I posted similar questions ealier last month, and received
much help to which I am very grateful.

First I ran:

  NDSolve{c'[k]==...,w'[k]==...,c[ks]==cs,w[ks]==ws},{c,w},{k,ks,k0}]

Then I got:

  {{c->InterpolatingFunction [...], w->InterpolatingFunction [...]}}

Next I ran, using the above result:

  NDSolve[{k'[t]==0.715c[k[t]]+... /. %..%[[1]],k[0]==0.3},k,{t,0,40}]

Then I successfully (with the helpful suggestions from MathGroup) got

  {{k->InterpolatingFunction [...]}}

Now there is a problem that I can not solve.
I want to look at how c[k[t]] moves as t moves from 0 to 40.

I found in page212 of the last edition of 'Mathematica' book
the following command and tried it.

		k /. First[%]

which allowed me to plot k[t] by:

  Plot[%[t],{t,0,40}]

When I similarly tried to plot c[k[t]] by:

 	Plot[%%%%[%[t],{t,0,40}]
       ^this is supposed to mean c[k] obtained by 
           c/. First[%]
        immediately after getting {c->InterpolatingFunction[ ]}

Then I got a very strange looking plot together with some
error messages.

Can anybody suggest what went wrong?

Noriaki Kinoshita
University of Cambridge



==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Re: Re: programming competition
  • Next by Date: Re: Quality of Exported Graphics
  • Previous by thread: Re: Plotting 3D Conics
  • Next by thread: InterpolatingFunction