Re: Keeping Interpolations
- To: mathgroup at smc.vnet.net
- Subject: [mg22868] Re: Keeping Interpolations
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Sun, 2 Apr 2000 15:33:37 -0400 (EDT)
- References: <8c5luq$40d@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
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