MathGroup Archive 1999

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

Search the Archive

Re: interpolatingfunction

  • To: mathgroup at
  • Subject: [mg15952] Re: interpolatingfunction
  • From: juan antonio gonzalez castro <jagonzal at>
  • Date: Wed, 17 Feb 1999 23:34:12 -0500
  • Organization: University of Illinois at Urbana-Champaign
  • References: <7a2bg1$>
  • Sender: owner-wri-mathgroup at

 Here is a way to handle it:
say you want the Num Sol of an ODE as follows
 In[1]:  NDSolve[{y''[x] == y[x], y[0]==y'[0]==1}, y, {x, 0, 5}]

you would the following output
Out[1]: {{y\[Rule]InterpolatingFunction[{{0.,5.}},"<>"]}}

to define this as a funtion you can define a function as follows:

 In[2]: f[x_] := y[x] /. %1 [[1]]

the function f[x], valid only for 0<x<5, is basically what you are

Try it,
Juan A. Gonzalez-Castro, 

>On 12 Feb 1999 phpcp at wrote:
> hi all,
> i solved a d.e. using NDSolve and got a solution in
> InterpolatingFunction form. How can i define this as a function that
> returns values using an argument.
> thanks,
> sanjay

  • Prev by Date: Finite Differences and Mathematica?
  • Next by Date: Re: PlotVectorField Package (easy question?)
  • Previous by thread: Re: interpolatingfunction
  • Next by thread: Re: searching for an enveloppe