I have a huge array of variables like this.
variables=Flatten[Join[
Flatten[Table[
alpha[i, j, k, l, m, n], {i, 0, 2}, {j, 0, 2}, {k, 0, 2}, {l, 0,
2}, {m, 0, 2}, {n, 0, 2}]],
Flatten[Table[
beta[i, j, k, l, m, n], {i, 0, 1}, {j, 0, 1}, {k, 0, 1}, {l, 0,
1}, {m, 0, 1}, {n, 0, 1}]], {gamma}]]
I have an array of values, for the example let's take:
values=Flatten[Join[
Flatten[Table[
1, {i, 0, 2}, {j, 0, 2}, {k, 0, 2}, {l, 0,
2}, {m, 0, 2}, {n, 0, 2}]],
Flatten[Table[
1, {i, 0, 1}, {j, 0, 1}, {k, 0, 1}, {l, 0,
1}, {m, 0, 1}, {n, 0, 1}]], {gamma}]]
How can I assign each one of my variables inside my array corresponding values from values?
If I do variables=values
, it will not set values to the alpha's or beta's but it will just change the variable "variables".
How can I say to mathematica to change the values of the variables alpha's and beta's stored in "variables" to affect them the value "1".
I could do a loop but I think there is a better option?