Linked Questions
38 questions linked to/from Elegant manipulation of the variables list
3
votes
3answers
93 views
Assign Values from Array to Array [duplicate]
I am trying to simply do the following
cVec = {a,b,c,d}
From another expression, I obtain another vector, say,
...
3
votes
1answer
95 views
HoldFirst being overridden by Activate [duplicate]
So here's the problem
a=1;a=2
works because of the HoldFirst attribute of Set, so that it ...
1
vote
1answer
49 views
How to assign a value to an already existing element of a list? [closed]
I want to do the following. Say I have a list:
test = List[a,b,c]
and I now want to assign some value to elements of that list, so that say if I assign 4 to a, ...
1
vote
2answers
644 views
How to assign values to symbolic arrays [duplicate]
My main question is how to assign values to symbolic arrays, in an efficient way. The code below is a simplified version of what I am trying to do and the output I get. Note that because I am using ...
2
votes
2answers
1k views
Why this list has a length of 1?
Here is the code :
bb = HoldForm[{aa[1], bbb[2], cc[3], dd[4]}]
it returns :
{aa[1], bbb[2], cc[3], dd[4]}
Which is what I ...
3
votes
2answers
141 views
HoldFirst and Hold expression as argument
I store a reference to the association in a held expression in a variable:
a=<||>;
b=Hold[a];
And in the code, I want to do manipulations with the original ...
0
votes
1answer
90 views
Set does not work
I tried following code, but it does not work as expected:
Do[Set[a[[1]],a[[2]]],{a,{x->2,y->5,z->x+y}}]
{x,y,z}
I ...
4
votes
2answers
148 views
0
votes
1answer
156 views
How to apply Set to held symbols listed in a variable?
I have a variable states that contains a list of held symbols:
...
3
votes
1answer
116 views
Get the name of a time series while using Table
I saw a number of related questions to the one I'm about to post; they helped, but none of them solved my problem entirely.
Get the name of a symbol passed to a function
Obtaining the name of a ...
2
votes
2answers
289 views
How to return the unevaluated variable names from a list of variables which have been declared
I feel like this should have a simple answer but I haven't found anything that works. The toy example of what I want is as follows:
...
2
votes
3answers
265 views
How can I assign many values each to a different variable? [duplicate]
How can I assign many values each to a different variable?
For example, I want to set $a = f(1),\,b = f(2),\,c = f(3),\,\dots,\,z = f(26)$ (generally more variables than these). How can I do this ...
0
votes
1answer
68 views
How to use Set correctly
My codes are shown in the picture attached.
I'm writing codes for numerical calculations frequently, and I think it looks neat and clear to organize input parameters in the form of table. For example,...
0
votes
0answers
43 views
How to transfer the list of parameters values into With [duplicate]
In the following case:
With[{x=1,y=2},Print[x+y]]
the values of x and y are declared in ...
1
vote
1answer
398 views
Printing names of indexed variables instead of values
I'd like to display only the variable (indexed variable) name (in symbol form, not in string form) instead of its value in Mathematica. Say I have a variable foo[i] ...