Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have some rather long output from a notebook I run on a remote server. There is a time limit on processes so I typically do NotebookSave[] after any important result. However, some of these results are truncated. I would like to force these (and only these) results to be fully expanded before the notebook saves.

I am aware of the Short command and the option in preferences to define the maximum byte size of output. However, I really do not know how large (in bytes or lines) the output is going to be. (Yes, I could experiment but it seems like there should be an easier way.) I tried Short[%,Infinity] but that didn't work. Any thoughts?

share|improve this question
    
I think they are just displayed truncated, but the data is there. It's hard to say without more details. Also I think you mean Short instead of Small. –  Ajasja May 18 '12 at 19:18
    
Oh, and perhaps it would be better to save the data to a file using Export or DumpSave or similar. –  Ajasja May 18 '12 at 19:19
    
Indeed, Export like so may work for you. –  Sjoerd C. de Vries May 18 '12 at 19:25
    
Couldn't you just set the preference setting to, say, 75% of your free memory? –  Sjoerd C. de Vries May 18 '12 at 19:45
1  
First, once the kernel quits the hidden data is gone. I too thought it was the FrontEnd just not displaying it all. However, once you quit the kernel you cannot "Show Full Output". Yes, I did mean Short (not sure why I was thinking Small). I could increase the maximum bytes to display but then it's easy to hang the FrontEnd making it try to display something massive. I considered exporting the data but there are multiple results per notebook and I wanted to keep them bundled. Looks like Print is probably what I want. –  EricMock May 18 '12 at 22:35
show 1 more comment

1 Answer

I recommend that you export your data to a file. But having said that, I think that a normal Print will have the same effect as the hypothetical Short[%,Infinity].

For example

(*generate some data*)
data = RandomReal[{-1, 1}, 10^4];
(*This will display truncated*)
data
(*So will this*)
Short[data, 100]
(*This will display all the data*)
Print[data]
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.