MathGroup Archive 2002

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

Search the Archive

Iterators

  • To: mathgroup at smc.vnet.net
  • Subject: [mg32826] Iterators
  • From: "Juan" <erfa11 at hotmail.com>
  • Date: Thu, 14 Feb 2002 01:43:50 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,
If I write:

y = Table[Part[w,p[i]],{i,2}], then I get a message saying thet p[i] is not 
a integer.

How can I avoid that?

I have to define w[[p[i]]] before I using it; p[i] are  iterators and w is a 
list of numbers.Then, at the end,I can write:
Table[{w[[p[1]]],w[[p[2]]},{p[1],a,b},{p[2],p[1],c}]

This is becouse,the numbers of iterators are enter with the parameters in 
the definition of the function, and you don't know that before.

Thanks
Juan



_________________________________________________________________
Descargue GRATUITAMENTE MSN Explorer en http://explorer.yupimsn.com/intl.asp



  • Follow-Ups:
  • Prev by Date: RSolve
  • Next by Date: Newbie question on Unix and Mathematica. And a question about graph theory
  • Previous by thread: Re: RSolve
  • Next by thread: Re: Iterators