# Can I store output data in the Notebook file? Specifically output from NDSolve[ ]

I am having some outputs from NDSolve of the form

{{x→InterpolatingFunction[…], y→InterpolatingFunction, … }}


and the evaluation of the respective commands can take a very long time. So I would like the data to also be available once I close and reopen Mathematica and the notebook.

I know that I could manually export the raw data of each of these solutions into separate files, and then read it in again into the file.

But I find this a bit cumbersome, and it also ruins the nice feature of the output of NDSolve to be immediately ready for use in Plot routines, etc..

So my question is: Is there a way to just store these NDSolve outputs with the notebook, so that next time I open it up it is immediately available to me?

If not so. What would be the smartest and most efficient way to do instead?

Thanks a lot for your insights!

• Look up Iconize – Carl Woll Jun 5 at 16:18
• @CarlWoll I tried that out now, and that is a great solution, thank you so much! There is one downside to it though: The saving and opening of the file now takes a much longer time than before. But I suppose the reasons for that are obvious, and one just cannot have one's cake and eat it at the same time. : ) Thanks again! – Britzel Jun 5 at 17:08
• You could also investigate PersistentValue, PersistentObject and Once, as these functions won't store anything in the notebook. – Carl Woll Jun 5 at 17:37
• Perhaps this related problem here could help you. – partial81 Jun 5 at 20:02
• Check this out also – dearN Jun 5 at 23:00