Re: Assigning Values to Many Symbols at Once
- To: mathgroup at smc.vnet.net
- Subject: [mg101707] Re: Assigning Values to Many Symbols at Once
- From: earthnut at web.de (Bastian Erdnuess)
- Date: Wed, 15 Jul 2009 07:07:13 -0400 (EDT)
- References: <h3hq0s$5b5$1@smc.vnet.net>
Gregory Lypny <gregory.lypny at videotron.ca> wrote: > Hello everyone, > > I can create a bunch of symbols on the fly using the Symbol command, > as in > > Table[Symbol["x" <> ToString[i]], {i, 5}] > > to get > > {x1,x2,x3,x4,x5} > > But how can I assign values to these all at once? What about Table[ ToExpression[ "x" <> ToString[i] <> " = f[i]" ], { i, 5 } ] ? Bastian