Modify variable names in a loop
- To: mathgroup at smc.vnet.net
 - Subject: [mg101744] Modify variable names in a loop
 - From: Parita <parita.patel at gmail.com>
 - Date: Thu, 16 Jul 2009 08:15:54 -0400 (EDT)
 
Hi
I would like to modify the variable name in a loop and assign values
to the variable.
For[kk = 1, kk <= 3, kk++,
    "output" <> ToString[Evaluate[kk]] = {kk,kk+1,kk+2};
];
I would like the following output
output1={1,2,3}
output2={2,3,4}
output3={3,4,5}
Although, "output" <> ToString[Evaluate[kk]] evaluates as expected, it
does not let me assign values. Am I missing something here?
Thanks in advance for your help
- Follow-Ups:
- Re: Modify variable names in a loop
- From: Adriano Pascoletti <adriano.pascoletti@dimi.uniud.it>
 
 - Re: Modify variable names in a loop
- From: Patrick Scheibe <pscheibe@trm.uni-leipzig.de>
 
 - Re: Modify variable names in a loop
- From: Oliver Ruebenkoenig <ruebenko@wolfram.com>
 
 
 - Re: Modify variable names in a loop