       Re: Saving Interpolated Function

• To: mathgroup at smc.vnet.net
• Subject: [mg81015] Re: Saving Interpolated Function
• From: sashap <pavlyk at gmail.com>
• Date: Sat, 8 Sep 2007 03:47:30 -0400 (EDT)
• References: <fbqpja\$696\$1@smc.vnet.net>

```Hi Phil,

You need to use Import/Export.

Using v 6:

(* construct an interpolating function *)
In:= if =
y /. NDSolve[ {y''[t] - y[t] t^2 == 0, y == 0, y' == 1},
y, {t, 0, 10}][];

Out= InterpolatingFunction

In:= Export[
ToFileName[{\$HomeDirectory, "Desktop"}, "interfunc.m"], if]

Out= C:\Documents and Settings\....\Desktop\interfunc.m

In:= if2 =
Import[ToFileName[{\$HomeDirectory, "Desktop"}, "interfunc.m"]];

In:= if2 === if

Out= True

Oleksandr Pavlyk
Wolfram Research

On Sep 7, 1:03 am, "lede... at ssb.rochester.edu"
<lede... at ssb.rochester.edu> wrote:
> I am doing some numerical analysis leading to an interpolated function
> that I will need later.
>
> These calculations take many minutes, and I want to beable to save the
> interpolated function--so it does not have to be regenerated every
> time I come back to the problem.
>
> How can I do this.?
>
> Thanks
>
> Phil

```

• Prev by Date: Re: [Mathematica 6.0.1] Confusing documentation on ColorData, where
• Next by Date: Re: private routines in mathematica 6 packages?
• Previous by thread: Re: Saving Interpolated Function
• Next by thread: Re: Saving Interpolated Function