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.

For example, how to make Mathematica display only the lines beginning with In[some number]?

In[8]:= m1 = {{1, 1, 1}, {8, 4, 2}, {64, 16, 4}}
Out[8]= {{1, 1, 1}, {8, 4, 2}, {64, 16, 4}}
In[9]:= m1.{b1, b2, b3} == {1, 1, 1}
Out[9]= {b1 + b2 + b3, 8 b1 + 4 b2 + 2 b3, 64 b1 + 16 b2 + 4 b3} == {1, 1, 1}
share|improve this question
    
I've deleted part of your code as not relevant for the question. Feel free to revert this if you want. –  Kuba Sep 2 '13 at 19:55
add comment

2 Answers

up vote 3 down vote accepted

I see three ways:

  1. Copy and paste everything into a new notebook (to ensure we don't destroy the output for good). Then select Cell -> Delete All Output from the menu.

  2. alt-click (-click on a Mac) on an input cell's bracket. All input cells will get selected. Now copy them and paste them into a new notebook.

  3. alt-click (-click on a Mac) on an input cell's bracket. All input cells will get selected. Now press ctrl-' (-' on a Mac). All outputs will be hidden, but they won't be deleted.

    (If you need to hide the input and keep the output, you can do the same but start with alt-clicking an output cell.)

share|improve this answer
add comment

4)

SetOptions[#, CellOpen -> False] & /@  Cells[EvaluationNotebook[], GeneratedCell -> True]

But I would choose Szabolcs's 3rd solution.

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.