Linked Questions

3
votes
3answers
89 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
48 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, ...
44
votes
5answers
3k views

How to create symbols from strings and set values for them?

I am trying to convert a list of string names into symbols, which will then be used to store data. I have 24 files (where the name of each file is a member of the list mentioned above) that I need to ...
553
votes
19answers
140k views

Where can I find examples of good Mathematica programming practice?

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
10
votes
6answers
1k views

Generate list of strings from a list of assigned variables

How do I generate a list of strings from a list of assigned variables? E.g. convert ...
1
vote
2answers
608 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
138 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 ...
22
votes
5answers
1k views

Reassign values to symbols

I've got a situation where I have, say 4 symbols, a, b, c and ...
0
votes
1answer
148 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
277 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: ...

15 30 50 per page