Re: Assigning Values to Many Symbols at Once
- To: mathgroup at smc.vnet.net
- Subject: [mg101716] Re: Assigning Values to Many Symbols at Once
- From: Roland Franzius <roland.franzius at uos.de>
- Date: Wed, 15 Jul 2009 07:09:08 -0400 (EDT)
- References: <h3hq0s$5b5$1@smc.vnet.net>
Gregory Lypny schrieb: > 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? Direct apply Set to existing inner pairs Lists Set@@@ Transpose[{symbols,values}] or Replace-ing List by Set during paired Symbols and values List generation Table[{Symbol["x"<>ToString[i]],valuelist[[i]]},{i,5}]}]/.List->Set -- Roland Franzius