MathGroup Archive 2005

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

Search the Archive

Re: lists of variables

  • To: mathgroup at
  • Subject: [mg58175] Re: lists of variables
  • From: David Bailey <dave at>
  • Date: Tue, 21 Jun 2005 06:02:49 -0400 (EDT)
  • References: <d9630u$q1t$>
  • Sender: owner-wri-mathgroup at

Heath Gerhardt wrote:
> I need to make lists of variables, for example
> {t1,t2,t3}
> but have not been able to figure out how to make Mathematica do this. 
> Tried using
> Array[t,3]
> which gives
> {t[1],t[2],t[3]}
> but then I don't know how to set the t[i]'s in expressions similar to
> F[t[1]_,t[2]_,t[3]_]:=Cos[t[1]+t[2]-t[3]]
> thanks in advance
> Heath
The simple answer to your question is something like:

Table[ToExpression["t" <> ToString[i]], {i, 1, 10}]

However, this is not a very usual thing to do - it might help to give 
more details of what you are trying to do.

David Bailey

  • Prev by Date: Re: Transformation rule problem
  • Next by Date: Re: lists of variables
  • Previous by thread: Re: lists of variables
  • Next by thread: Re: lists of variables