I am looking for an efficient way to perform the following operation without For loops
For[a = 1, a <= 2, a++,
For[b = 1, b <= 2, b++,
For[c = 1, c <= 2, c++,
Subscript[
EV, Aindex[[a]], Bindex[[b]], Cindex[[c]]] =
EVec[[a, b, c]];
]
]
]
where Aindex (similarly B,C) is a vector of indices relevant to my problem. In other words all I am doing is changing the label of the index. EVec carries all the information that I need, but using array index a,b,c >=1 is not an intuitive way of indexing in my case. Suggestions?
Subscript: https://mathematica.stackexchange.com/a/18395/4999, point 3. "Really the best way to use subscripts is to not use them." – Michael E2 Jul 27 '21 at 15:36Doloop was easy, efficient, and morever, clear:Do[ Subscript[EV, Aindex[[a]], Bindex[[b]], Cindex[[c]]] = EVec[[a, b, c]], {a, 2}, {b, 2}, {c, 2}]– Michael E2 Jul 27 '21 at 22:36