# Questions tagged [variable-definitions]

Questions on assigning and unassigning definitions to names that represent them, including issues raised by context and localization. Use tag [assignment] for issues relating to Set versus SetDelayed.

439 questions
Filter by
Sorted by
Tagged with
48 views

### a variable as all values from a list

I have a small Problem with lists and variables. I want mathematica to calculate a formula I derived for 200 values of w between 0 and 5 in ascending order. (maybe I can define w along the lines of) <...
59 views

### Dynamic updating problem

Consider the code ...
89 views

Suppose you want to access a variable defined in a "surrounding" context (scoped via Begin and End) from within ...
55 views

### Number of values stored in a function

Suppose I run this: f = 1; f[n_] := f[n] = 2 f[n - 1]; f Now there will be 1001 values stored in f, and ...
439 views

### very simple but unexpected aspect of Function[ ]

I've always thought (2#+1)& and Function[x,2x+1] are interchangeable in common sense. But, ...
35 views

59 views

### Define/store individual elements of Table output for back-substitution

At its core, mine is a very simple communication error between me and Mathematica that I haven't been able to crack, so I do apologise if it seems embarassingly inane. Please consider the following ...
23 views

### Redefining the output of a function

ftn1 = Sin[s]^2 + 3 t^2 + u^5 3 t^2 + u^5 + sin[s]^2 ftn2[s_, t_, u_] := ftn1 ftn2[2, 1, 2] 3 t^2 + u^5 + Sin[s]^2 Hi ...
128 views

### Why does f[set_]:=AppendTo[set,5] not work when applying f to a set?

The following code works ccc = {}; AppendTo[ccc, 5]; ccc and gives the output {5} However, the following code does not work: <...
133 views

### Construct 1 variable function from given 2 variable function

Given a function f[x , y]. The definition of f is not self-describing. (f was defined with objects other than f.) Then I want to construct a function g[x] such that f[x,y] and g[x][y] are the same, ...
6k views

### Quit vs ClearAll[“Global*”]

Quit erases all the definitions (by quitting the kernel), but so does ClearAll["Global*"] (or other contexts). What's the ...