Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: InterpolatingFunction
Replies: 1   Last Post: Oct 14, 1996 2:19 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
N Kinoshita

Posts: 3
Registered: 12/7/04
InterpolatingFunction
Posted: Oct 7, 1996 1:59 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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









Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.