Linked Questions
42 questions linked to/from Assigning values to a list of variable names
1
vote
2
answers
1k
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
3
answers
348
views
Assign images to elements in a list [duplicate]
I would like to assign a list of images of patients to the patient name. To do so I created a list with all the patients names and now I want to assign to every element in the list the correct images. ...
1
vote
1
answer
151
views
Variables input generation for Minimization in High dimensional space [duplicate]
I'm currently doing optimization in a high dimensional space. I was thinking of giving FindMinimum (or NMinimize not certain yet)...
1
vote
1
answer
127
views
How to set the values into some variables from different lists [duplicate]
I have a list of Values and a list of variables. I want to set the Values into Variables.
Assume the following code:
...
0
votes
0
answers
31
views
How would I take a variable from a string and reassign its value? [duplicate]
If I have string={a,b,c}, where a=1, b=2, and c=3, how would I reassign a value to variable "a" without directly typing a = _? If I type string[[1]], the out put is "1". How would I generate the ...
164
votes
3
answers
14k
views
How to make use of Associations?
I have been curious about it for long. Now that Mathematica 10 arrives, I think it's time to ask the question: How the new Association data structure would be used ...
70
votes
10
answers
4k
views
Injecting a sequence of expressions into a held expression
Consider the following toy example:
Hold[{1, 2, x}] /. x -> Sequence[3, 4]
It will give
Hold[{1, 2, Sequence[3, 4]}]
...
51
votes
6
answers
5k
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 ...
23
votes
5
answers
1k
views
Reassign values to symbols
I've got a situation where I have, say 4 symbols, a, b, c and ...
55
votes
2
answers
2k
views
Head and everything except Head?
I have been working on picking expressions apart using Head and Part and encountered a little mystery. Consider the canonical ...
25
votes
5
answers
6k
views
How to pass a symbol name to a function with any of the Hold attributes?
Given a function with the attribute HoldFirst, HoldAll or similar, and a variable, list, how ...
25
votes
4
answers
3k
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) ...
11
votes
4
answers
429
views
How to change the variables Qi's to Ri's in one or two steps
I was wondering if there is a command in Mathematica to change all the following Qi's to Ri's? For example, change Q1 to R1, Q2 to R2, etc.
...
7
votes
5
answers
504
views
Prepend multiple list with a same header
If I have a header and I want this header to be prepended to every list but apparently the Map (\@) function does not work with ...
11
votes
3
answers
801
views
MapThread gives different results from ToExpression when trying to assign variables from a list
I have the following data set:
data = {{"Jakarta","Surabaya","Bandung"},{1,2,3}}
and I'd actually like to assign the numerical values to the categorical data so ...