0
$\begingroup$

This question already has an answer here:

I have a very simple notebook like this:

Quit[]
a = 10;
Sin[a]
k = 10;
Plot[Exp[x], {x, 0, 10}]
Plot[Sin[x], {x, 0, 10}]
k = 0.8;
Sin[k]
A = {1, 2, 4, 6, 9, 4};
ListPlot[A]

I want evaluate with "one click" the code from k = 10; to A = {1, 2, 4, 6, 9, 4};, ignoring the rest;

I try with Ctrl+A, then Ctrl+click to deselect unnecessary cells and then Enter but mathematica evaluate only one cell.

This is a very similar question, but it looks like it does not work for me.

$\endgroup$

marked as duplicate by Alexey Popkov, LCarvalho, m_goldberg, MarcoB, J. M. is away Nov 9 '17 at 14:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ How is your notebook structured? Is this all in one cell? Are these in separate cells? $\endgroup$ – b3m2a1 Oct 8 '17 at 18:55
  • 1
    $\begingroup$ Yes, are separate cells $\endgroup$ – Ugo Mela Oct 8 '17 at 19:02
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – Michael E2 Oct 8 '17 at 19:04
  • 1
    $\begingroup$ And what is the decision procedure for when you've hit the end cell? I think the easiest thing to do here is to just wrap things in a cell group, because then you can click on the group bracket and evaluate that. $\endgroup$ – b3m2a1 Oct 8 '17 at 19:04
1
$\begingroup$

I try with Ctrl+A, then Ctrl+click to deselect unnecessary cells and then Enter but mathematica evaluate only one cell.

You should use the Evaluation ▶ Evaluate Cells menu item:

http://reference.wolfram.com/language/ref/menuitem/EvaluateCells.html

Note that this can be easily found in the Docs:

http://reference.wolfram.com/search/?q=Evaluate+selected+Cells

$\endgroup$

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