How do you label output variables in an IDL FOR loop for further processing outside the loop in the same program?
        Posted  
        
            by 
                user610769
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by user610769
        
        
        
        Published on 2011-02-10T03:38:42Z
        Indexed on 
            2011/02/21
            15:24 UTC
        
        
        Read the original article
        Hit count: 228
        
idl
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?
© Stack Overflow or respective owner