I'm not sure how to name this problem appropriately. But anyway.
I have, say, three variables (arrays in my case), which I call:
A1, A2, A3
I would like to perform a certain operation on all of these arrays. Obviously I don't want to duplicate the code. What I figured is the following:
For[id = 1, id <= 3,
INPUT = ToExpression["A" <> ToString[id]];
INPUT = Table[{INPUT[[j, 1]], 10^4*INPUT[[j, 2]]}, {j, 1, Length[INPUT]}];
id += 1;
];
This unfortunately does NOT work.
It's just an example. But the big question is how to handle names of variables in "such" cases? Any help greatly appreciated.
A[1] = ...; A[2] = ...;
etc. $\endgroup$ – rm -rf♦ Mar 6 '13 at 16:40