MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Modify variable names in a loop

  • To: mathgroup at
  • Subject: [mg101744] Modify variable names in a loop
  • From: Parita <parita.patel at>
  • Date: Thu, 16 Jul 2009 08:15:54 -0400 (EDT)


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

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

  • Prev by Date: Re: Re: NDSolve problem
  • Next by Date: Re: Determine if a parameter is a function
  • Previous by thread: Maximize question
  • Next by thread: Re: Modify variable names in a loop