MathGroup Archive 2007

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

Search the Archive

Variable-length list?

  • To: mathgroup at
  • Subject: [mg83417] Variable-length list?
  • From: "Hoa Bui" <hoabui05 at>
  • Date: Tue, 20 Nov 2007 03:45:46 -0500 (EST)

Hi all,

I want to have either a module or a function that inputs a
varying-length list M[[nx]], where nx is a parameter, and accesses all
of its elements.

For example:


If M={3,4} then f would do something like:
For [i=1,i<3,i++,
For [j=1,j<4,j++,

If M={3,4,5} then:
For [i=1,i<3,i++,
For [j=1,j<4,j++,
For [k=1,k<5,j++,

I wonder if this is doable in Mathematica, and/or what would be a way to do it?

Thanks a lot,

  • Prev by Date: Re: ordered positions (OrderedPosition?)
  • Next by Date: Using FindRoot
  • Previous by thread: Re: VectorFieldPlot Arrows
  • Next by thread: Re: Variable-length list?