MathGroup Archive 1998

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

Search the Archive

Re: Variables names

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15048] Re: [mg15002] Variables names
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 9 Dec 1998 04:12:30 -0500
  • Organization: Universitaet Leipzig, Institut fuer Informatik
  • References: <199812050630.BAA04464@smc.vnet.net.>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Kim,

the best way is to use x[i] instead of x1, x2, ...

You can still generate the names with

ToExpression["x"<>ToString[i]]

Hope that helps
  Jens

Kim Allemand wrote:

> Hi,
> I have a square matrix Q of dimension N and would like to generate the
> quadratic function $\sum_{i,j}q_{ij}x_i x_j$. The problem is how to say
> to Mathamatica that the variables names are x1, x2, etc. Is it possible
> to generate variables names in an automatic way? A possibility would be
> to generate manually a vector NN={x1, x2, x3, ....} of dimension N and
> then to pick NN[[i]] for the ith variable name, but imagine when
> N=1000... !!
> Thanks, Kim



  • Prev by Date: Re: What's wrong in this plot?
  • Next by Date: Re: Mathematica Ouput: subscripts and superscripts
  • Previous by thread: RE: Variables names
  • Next by thread: Re: Variables names