MathGroup Archive 2007

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

Search the Archive

RE: Interpolation


Hi Robert,

>                 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.

You might try DumpSave[].

	data = {#, Sin[3. #/Pi]} & /@ Range[-Pi, Pi, Pi/12.];
	int = Interpolation[data];
	Plot[int[t], {t, -Pi, Pi}, 
	    Epilog -> {Point[#] & /@ data}
	    ];
	
	DumpSave["test.mx", int];
	
	Remove[int];
	Clear[int];
	
	Get["test.mx"]
	Plot[int[t], {t, -Pi, Pi}, 
	    Epilog -> {Point[#] & /@ data}
	    ];

Regards,

Dave.


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