Re: dynamic nested loops
- To: mathgroup at smc.vnet.net
- Subject: [mg122863] Re: dynamic nested loops
- From: Ray Koopman <koopman at sfu.ca>
- Date: Sun, 13 Nov 2011 04:42:51 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <j9irsq$8g5$1@smc.vnet.net>
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}, ...{}} ?