0
$\begingroup$

I just started getting into mathematica and have the problem that whenever I save and reopen my .nb file, all functions and variables are cleared and I need to shift+enter every cell again to continue working on it. Is this normal, suggested to be like that or possible to turn off?

$\endgroup$
1
  • $\begingroup$ Yes, it is normal. This is a one thing Mathematica is different from other program. $\endgroup$
    – imida k
    Commented Mar 29, 2021 at 19:47

1 Answer 1

0
$\begingroup$

They are different possibilities.

  1. You can run all the notebook by clicking in the menu "Evaluation" then "Evaluate Notebook".

  2. You can choose the cells you want to be evaluated just before the first "shift-enter". Those cells are called "Initialization Cells". Richt click on the cell you want and then "Initialization Cell". There is also a keyboard short-cut (depending on your OS). You can also click on the Menu Cell > Cell Properties > Initialization Cell

  3. Save the functions you want into a package. More info here https://reference.wolfram.com/language/tutorial/ModularityAndTheNamingOfThings.html#3434

$\endgroup$

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