MathGroup Archive 1992

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

Search the Archive

Iterator sequences

  • To: mathgroup at
  • Subject: Iterator sequences
  • From: hkunzle at (H.P. Kunzle)
  • Date: Sat, 3 Oct 92 13:27:11 -0700

Is there a way in Mathematica to generate a list of
iterators dynamically? 

What I have in mind is something like

  Sum[ Product[v[i]^j[i],{i,3}],Table[{j[i],nn[[i]]},{i,3}]]

where nn is a given list of integers.
This won't work since Table[..] is a list of lists, not
just a sequence. I tried to fool Mathematica into
accepting it by using 

  Sum[ Product[v[i]^j[i],{i,3}],
       ToString[Table[{j[i],nn[[i]]},{i,3}]],1],-1]] ]

but also get just an error message:


     Argument ToExpression[StringDrop[<<8>>op[<<2>>], -1]]
       at position 2 does not have the correct form for an

Any help is appreciated.

Hans Kunzle

H.P. Kunzle               | Office: (403) 492-3798	
Department of Mathematics | Home:   (403) 437-4141	
University of Alberta     | Fax:    (403) 492-6826
Edmonton                  | E-mail: hkunzle at
CANADA T6G 2G1            |         (userkunz at

  • Prev by Date: Poisson Brackets
  • Next by Date: ListPlot3D
  • Previous by thread: Poisson Brackets
  • Next by thread: Re: Iterator sequences