0
$\begingroup$

Suppose I have a section in a notebook and I do some manipulation on data and use some variables in that section. Can I use the same variables in a different section of the notebook to do manipulation on different set of data such that when I access the first section of notebook all the calculation remain intact?

$\endgroup$
4
  • $\begingroup$ Like in docs and mathematica.stackexchange.com/q/211221/5478? $\endgroup$
    – Kuba
    Feb 5, 2021 at 18:32
  • $\begingroup$ If you do nothing, then variables are global so that x in one place is the same as x in any other place. Look at Block for local scoping of variables. Or you can make individual notebooks a local environment. $\endgroup$
    – bill s
    Feb 5, 2021 at 18:38
  • $\begingroup$ Also look at Module $\endgroup$
    – Jagra
    Feb 5, 2021 at 19:01
  • $\begingroup$ Look also at: "tutorial/ModularityAndTheNamingOfThings#27982" in the help $\endgroup$ Feb 7, 2021 at 10:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.