Skip to main content
2 of 3
edited tags
Szabolcs
  • 236.5k
  • 31
  • 641
  • 1.3k

Save interpolated function

Is it possible to save a function which was created via Interpolation of some data in such a way that I can use this function in a new mathematica session without repeated interpolation of the data?

For example, I have some data which I interpolate in the following way:

exampleData={{1,1},{2,3},{3,4},{4,7},{5,5},{6,4},{7,2}};
interPolFunc[x_]:=Interpolation[exampleData,x]

Now one of the following would be nice: Either: There is a way to save the interpolated function so that it can be used the next time when I work with mathematica (but I do not want to interpolate the data again, so that I can delete them). Or: The data and Interpolation command are saved in a separated notebook which is executed when I want to use my interPolFunc in another notebook.

Unfortunately I did not find any solution for that. But I hope that some of you have several suggestions!

partial81
  • 3.1k
  • 1
  • 23
  • 30