# Questions tagged [variable]

Questions on the use or manipulation of Mathematica variables (i.e. names associated with a changeable value). Use [variable-definitions] or [assignment] for questions on variable context localization, or assignment.

209 questions
Filter by
Sorted by
Tagged with
68 views

53 views

### to reduce the unknowns of a set of equations with several symbolic coefficients, e.g. using the GroebnerBasis

I have a set of $4$ equations with $4$ unknowns $\theta_1$ to $\theta_4$, and would like to eliminate the number of unknowns, to get a smaller set of equations, e.g. $n$ equations with $n$ unknowns, ...
378 views

### Extract fit error from parameter table to use as a variable

Is there anyway to extract the fit error and store it in a variable. I have done something similar to use actual fit results as ...
29 views

### function restorage problem [duplicate]

Code below f[1, 1] = 1; f[1, 2] = 2; f[1] = Min[f[1, 1], f[1, 2]] Outputs 1 However, the desired output is ...
39 views

### Taking variables from string

In a mathematica operation I am getting the o/p say, 1->2. For the next step, I want to use these two numbers as variables, say take them as 1 = m and 2 = n. How can I do it.
117 views

### variable dimension table

(A very simplified version of my code:) How can I create a Table[] with a variable number of dimensions, e.g.: ...
128 views

### How to transform a series of scalar variables to a vector variable? [closed]

Say a function is set: a := Sum[b[i], {i, 8}] As can be seen that b[i] is a scalar variable. Now I want to transform the ...
81 views

### How to form list of all OwnValues of symbols in Global context? [duplicate]

How do I get the list of all OwnValues of symbols in the Global context? All my attempts have failed because ...
404 views

### Assign an array of numbers to an array of variables

I have a huge array of variables like this. ...
94 views

### Treat 2 variable as 1

Is there anyway to treat two variable, that are a result of expansion, as one? To use Solve[] I can do ...
206 views

### Pure function within another function

I am writing a function along the lines of the following: func[basis_,coordinates_,vars_]:=Table[Function[vars,monomial]@@@coordinates,{monomial,basis}] The idea ...
71 views

### Solve trigonometric expression

Mathematica is not able to solve this expression : $Solve[ 2 e == h + r * sin[theta - q ] + b* sin [theta ] + e*cos[theta ] , theta]$ Solve::nsmet: This system cannot be solved with the methods ...
392 views

### Is it possible in mathematica to use dynamic names of variables [duplicate]

I have variables in my code following the following notation : theta12, theta13, theta14 etc.. I would check the values of all this variable so I could write an if condition for each theta but I ...
48 views

### Variable assignment/replacement issues

I have three questions about variable assignment. Module[{z}, z = y; p'[y] /. p -> Function[y, Evaluate[z]]] When I run the above code, it outputs 0. 1) If I ...
45 views

### Similar Variable Names

I have variables $X1,...,X10$ and $X1hat,..., X10hat$ in a system of equations. How can I refer to these variables in a summation? I am looking for something like: ...
143 views

### How to find variables set through Get[“/some/path/dump.mx”]? [duplicate]

(NB: I could not find any good tags for this post. Please feel free to add better ones.) Suppose that the file /some/path/dump.mx was generated during an earlier ...
33 views

### Substituting variables in only certain environments? [duplicate]

I was integrating a function and got something essentially like E^(mu beta) * (1/beta) There beta is defined as ...
146 views

### Separating variables in an expression

Given a non-polynomial expression such as: expr = x z Sin[x] Sin[y] and that we know that the variables are: var = {x,y,z} ...
45 views

### Unexpected behavior of Variables [duplicate]

I apologize in advance if this is a duplicate. Variables has a strange behavior when it encounters powers: ...
163 views

### Context inside Do[…]-loop

Consider the following code: Begin["mycontext"]; myvar = 7; Print[Context[]]; Print[Context[myvar]]; End[]; with the output mycontext mycontext Now ...