MathGroup Archive 2007

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

Search the Archive

Re: Interpolation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg75060] Re: Interpolation
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Mon, 16 Apr 2007 04:08:00 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <evsq9b$p3$1@smc.vnet.net>

Robert Pigeon wrote:
> Greetings,
> 
>                 Here is the situation: I have four notebooks. In each I have
> datasets and I use Interpolation[dataset] to get an interpolation function
> for each dataset. Now I need to use those four interpolations in a fifth
> notebook that is not, probably, going to run at the same time as the other
> (they will be closed). I do not want to read all the data again and compute
> the interpolations to use them. So, is it possible to save or copy the
> different  interpolations to a new notebook and use them?
> 
>                 I could probably use FindFit and then copy the polynomial
> function  in a different notebook to use it. But I need a good fit, a very
> good fit. Actually I need the precision given by Interpolation.
[snip]

Hi Robert,

You could use the function *Save* [1] and *Get* [2]. For example, in the 
first notebook you can do all your computations, get the interpolating 
function, and finally save its definition in a file.

(* First Notebook *)
data = Table[{y^2, y}, {y, 1., 10.}];
sqrt = Interpolation[data];
Save["C:\\Temp\\mysqrt", sqrt]

Now in the second notebook, you can load the definition of the 
interpolating function with *Get* as in

(* Second Notebook *)
sqrt = << "C:\\Temp\\mysqrt";
{Sqrt[10.], sqrt[10.]}

Regards,
Jean-Marc

[1] http://documents.wolfram.com/mathematica/functions/Save

[2] http://documents.wolfram.com/mathematica/functions/Get


  • Prev by Date: Re: Beryl x Mathematica
  • Next by Date: Re: Beryl x Mathematica
  • Previous by thread: RE: Interpolation
  • Next by thread: Re : Re: Interpolation