jmemami
(Javad Emami)
1
1)Is there a way to declare a variable (say, x) to be treated as real during your Mathematica session in entire notebook?
-
The command Clear[symbol,…] clears Global variables or not? If not is it a way to clear all variables (Global as well)
-
Is there a command to clear all variables without naming them?
Many thanks
JME
sghuisman
(Sander Huisman)
2
-
Some functions accept Assumptions, for those cases you could add to $Assumptions something like Element[x, Reals].
-
You can try it out:
fdfasda
x = 3
ff[a_] := Module[{},
Clear[x];
Print[a]
]
ff[1]
x
So yes, it does. I’m not sure how this interacts with namespaces, but can surely be found here: guide/NamespaceManagement
- You could use Clear or ClearAll
To do something like:
ClearAll[Evaluate[Context[] <> "*"]]