MathGroup Archive 2011

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

Search the Archive

Re: dynamic nested loops


On Nov 11, 2:03 am, Ron <rag... at verizon.net> wrote:
> i need to perform nested sums such as Sum[f, {i,imin,imax},
> {j, jmin, jmax}, ...{}].  In each nest the new index is a
> function of the previous and the max values vary.  Also at
> the beginning I do not know how long a nest I need.  I can't
> come up with anything that works.  I could construct a list
> {{i,imin,imax},{j, jmin, jmax}, ...{}} but "Sum" doen't know
> what to do with the outside braces{...}.
> ANy suggestions would be much appreciated.

If you don't know at the start how deep the nest will be, how are
you constructing the list {{i,imin,imax},{j, jmin, jmax}, ...{}} ?



  • Prev by Date: how to plot new data points to pre-existing figure
  • Next by Date: Re: Generating Word Documents from Mathematica
  • Previous by thread: Re: dynamic nested loops
  • Next by thread: How can I protect an cdf document to avoid that the user open the