Re: Sharing numerical data along with a Mathematica notebook
- To: mathgroup at smc.vnet.net
- Subject: [mg118217] Re: Sharing numerical data along with a Mathematica notebook
- From: Thomas Münch <thomas.muench at gmail.com>
- Date: Sun, 17 Apr 2011 07:51:09 -0400 (EDT)
Hi Andrew,
I like to include numerical data hidden inside buttons, that the user
then has to press:
With[{temp=Compress[myLargeData]},Button["press to load
data",myLargeData = Uncompress[temp];Print["data is now loaded and saved
in the variable myLargeData"]]]
You can then delete the code, leaving the button there. Put your cursor
next to the button, Press Ctrl-Shift-E, and you will see that the
underlying code of the button contains a compressed version of your data.
A disadvantage of this method is that the button itself can not be
pressed "automatically", is if it were an initialization cell.
thomas