MathGroup Archive 2000

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

Search the Archive

Re: Keeping Interpolations


Matt:

data = Table[{x, Sin[x]}, {x, 0, 7, .2}];

fn = Interpolation[data]

        InterpolatingFunction[{{0., 7.}}, "<>"]

Save["myfn", fn]

Remove[fn]

Get["myfn"]

        InterpolatingFunction[{{0., 7.}}, "<>"]

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


Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565



<Matt.Johnson at autolivasp.com> wrote in message
news:8c5luq$40d at smc.vnet.net...
> Hi-
> I wrote a routine using Interpolation to interpolate over a 2-d grid.  The
data
> set is large and the processing of the data to get it into the
interpolation
> routine is time consuming.  I am wondering if I can somehow "save" the
> interpolation function so I don't have to read the data and perform the
> interpolation routine every time I want to use it.  In other words, I want
to be
> able to quit the kernel and restart and be able to use the interpolation
routine
> without re-loading all of the data to create it.
>
> Thanks for any help-
>
> Matt Johnson





  • Prev by Date: Re: Counting the total number of available Mathematica commands ?
  • Next by Date: Plato's Academy of Mathematica: Soapbox warning!
  • Previous by thread: Keeping Interpolations
  • Next by thread: Re: German documentation