I have a FOR loop like this:
FOR k = 1,216 DO atom = G[*,0:*:(215+k)] END
What I would like to be able to do is to store in memory the array for each atom, say, atom_k and then call these different variables to perform further operations outside the FOR loop. Conceptually, I want to label the "atom" variable with the "k" counter somewhat like this:
FOR k = 1,216 DO atom(k) = G[*,0:*:(215+k)] END
Of course, this doesn't work because "k" is no longer a label in this case. Does anyone know?
I assume you're talking of IDL, the language developped by ITTVis. I don't understand the way you index G nor the END instruction, but I'm not working with latest version.
Try the EXECUTE command. This allows you execute statements at runtime.
STRTRIM converts integers to string without blanks around.