Mathematica is remember variable values it shouldn't be

  • Mathematica
  • Thread starter rynlee
  • Start date
  • #1
rynlee
45
0
Hi There,

Once I put in values for variable farther down the code from when I first use them (I initially want them just in variable form, I don't want their values defined), every time I evaluate the cell mathematica puts the values in farther up.

Even more disturbing, however, is in other cells that are even above that cell, those variables get defined.

Even more disturbing, when I put the Clear[] function in the appropriate places, mathematica still assigns values to those variables!

Is this a bug? Or am I seriously misunderstanding something?

Thanks for any help or advice!
 

Answers and Replies

  • #2
rynlee
45
0
Scratch that, I believe I got it working with appropriate Clear[]'s placed for all the variables of interest. It seems that once you put a value for a variable in and it is compiled, mathematica stores that value unless it is cleared?
 
  • #3
Simon_Tyler
313
1
That's right. The notebook is not spatially linear. In essence it's just a pretty interface to the kernel.
 

Suggested for: Mathematica is remember variable values it shouldn't be

  • Last Post
Replies
6
Views
7K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
7
Views
15K
Replies
1
Views
4K
  • Last Post
Replies
3
Views
4K
  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
7
Views
5K
  • Last Post
Replies
6
Views
3K
  • Last Post
Replies
10
Views
4K
Top