0

I created a large list of real numbers and saved it to Tes.nb

Tes = Sort[RandomReal[{-7., 7.}, 1000000]]

But I noticed the size of Tes.nb file was merely 10 KB.

Thinking strangely, I opened the Tes.nb file and clicked 'show all button'.

enter image description here

It showed an error message :

$OutputSizeLimit : ...

The data has disappeared literally.

It is surprising and disappointing that mathematica didn't warn anything when saving .nb file.

How can I save large data correctly ?

Why didn't mathematica warn anything ?

imida k
  • 4,285
  • 9
  • 17
  • 2
    By default Mathematica does not save variable values inside the notebook, so this is normal behavior. However, workarounds have been proposed. See for example Saving data inside a notebook so that I don't have to run it again and Iconize. – MarcoB Mar 31 '21 at 04:02
  • Thank you! I want to comment something : Any output of such form (like above pic), will not be saved in default without any warning.
    Any output which is not of such form will be saved correctly in default.
    But you can save a notebook of such form (like above pic) correctly, with some trick - follow the link MacroB presented.
    – imida k Mar 31 '21 at 21:41

0 Answers0