Re: building a list containing elements f(i,j)
- To: mathgroup at smc.vnet.net
- Subject: [mg71126] Re: [mg71045] building a list containing elements f(i,j)
- From: Carl Woll <carlw at wolfram.com>
- Date: Thu, 9 Nov 2006 03:37:26 -0500 (EST)
- References: <200611060752.CAA08745@smc.vnet.net>
xarnaudx at gmail.com wrote: >hi, >i want to construct a list of the form: >{ f[1,1], ... f[n,m] } >So the list contains elements of the form f[i,j] with i ranging from 0 >to n, and j from 0 to somebound[i]. > >What would be the most elegant way to this? >thanks > > In my opinion, one of the more elegant possibilities is to use Tuples: Tuples[ f[Range[0,5], Range[0,3]] ] Carl Woll Wolfram Research
- References:
- building a list containing elements f(i,j)
- From: "xarnaudx@gmail.com" <xarnaudx@gmail.com>
- building a list containing elements f(i,j)