MathGroup Archive 2010

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

Search the Archive

Re: Answer

  • To: mathgroup at
  • Subject: [mg110323] Re: Answer
  • From: Peter Pein <petsie at>
  • Date: Sun, 13 Jun 2010 04:11:19 -0400 (EDT)
  • References: <huqkoa$2hh$>

Am Thu, 10 Jun 2010 12:10:50 +0000 (UTC)
schrieb "S. B. Gray" <stevebg at ROADRUNNER.COM>:

> How can you create a set of variables: x1 to xn  using the Table, or
> some similar function?    I need a large list of variables to use in
> a linear program and so far have to type them out manually.
> David
> ...
something like
In[1]:= Table[ToExpression["x"<>ToString[k]],{k,0,10}]
Out[1]= {x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10}

  • Prev by Date: Re: Automatic update of variables
  • Next by Date: Re: Number to string headed by zeros
  • Previous by thread: Answer
  • Next by thread: Re: Answer