Clearing symbol values, removing symbols from memory and general garbage collection.
6
votes
1answer
78 views
ClearAll just for current notebook
So in my search to fine tune Mathematica to what works for me, I found a nice setting that helps separate variable declaration between notebooks. Under Global Preferences, searching for CellContext ...
0
votes
0answers
120 views
Mathematica 9.0.1 is clearing variables
I have noticed an errant behavior new in Mathematica 9. I thought at first it was because I was importing a very large text file and Mathematica just couldn't handle it. But now, I have seen the ...
12
votes
3answers
297 views
How to clear parts of a memoized function?
I have a function of two variables, e.g.:
f[a_, b_] := f[a, b] = something f[a - 1, b - 1] etc
With the above code I used the concept of memoization to speed up ...
6
votes
2answers
178 views
How to clear just variables defined in one notebook?
I'm trying to set up some notebooks so that I have one "seed" notebook that defines all my values globally when I run it. I have three other notebooks that take these values and run with them to do ...
12
votes
6answers
333 views
How to clear all variables except one?
I have a lot of variables: $a,b,c,d, \ldots $
I want to clear the values of all of them except $b$. It's really lengthy to write
Clear[a];
Clear[c];
...
Is ...
7
votes
3answers
376 views
Elegant manipulation of the variables list
I have a list of global variables (some of them are indexed variables), for example:
varsH = Hold[U0[1], U0[2], B0, V0[1], V0[2]]
Or (if it is easier to handle) ...
15
votes
5answers
3k views
How do I clear all user defined symbols?
Is there some way to do this other than going to Evaluation -> Quit kernel and firing a new one up?
1
vote
0answers
98 views
What does Clear[Evaluate[Context[] <> “*”]] mean? [closed]
In a few Mma notebooks I've seen this line:
Clear[Evaluate[Context[] <> "*"]];
I suspect that it kind of "clears" whatever there might be before using this ...
12
votes
1answer
143 views
Is it possible to Clear all variables (but not functions)?
I have written a Mathematica script in which I define functions and variables. Here is a vastly simplified example:
...
12
votes
4answers
937 views
Clear complains that a variable is not a symbol or a string?
Here's a small listing where I've used EscqEsc to typeset θ in the notebook:
...
26
votes
2answers
658 views
Is there a way to separate variables between multiple notebooks?
I often correct homework by checking the calculations in Mathematica. Sometimes you would like to have two solutions open at once. However often defined symbols such as ...
0
votes
2answers
661 views
How do I clear all variables with subscripts? [duplicate]
Possible Duplicate:
Clear complains that a variable is not a symbol or a string?
Clear["Global*"]` Works for most variables, however if i do something ...
10
votes
2answers
360 views
How to unload automatically loaded packages?
I know that this has been discussed here (How do I clear all user defined symbols?), but my case is somewhat different. How does one unload packages during runtime that were loaded with the start of ...

