Re: Table Iterators

• To: mathgroup at smc.vnet.net
• Subject: [mg52626] Re: [mg52618] Table Iterators
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Sun, 5 Dec 2004 02:08:02 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```Off[General::spell1];

{iMin, iMax, di} = {1,5,2};
{jMin, jMax, dj} = {2,6,2};

Table[a[i,j],{i,iMin,iMax,di},{j,jMin,jMax,dj}]

{{a[1, 2], a[1, 4], a[1, 6]}, {a[3, 2], a[3, 4],
a[3, 6]}, {a[5, 2], a[5, 4], a[5, 6]}}

Bob Hanlon

>
> From: Gregory Lypny <gregory.lypny at videotron.ca>
To: mathgroup at smc.vnet.net
> Date: 2004/12/04 Sat AM 04:07:57 EST
> To: mathgroup at smc.vnet.net
> Subject: [mg52626] [mg52618] Table Iterators
>
> Hello Everyone,
>
> I need to create many tables, all with the same iterators {i, iMin,
> iMax, di}, {j, jMin, jMax, dj}.  I'd like to be able to set the
> iterators outside of the Table function so that I can change them and
> have all of the tables change accordingly.
>
> I've tried
>
> rowDim:= {i, iMin, iMax, di} and colDim:={j, jMin, jMax, dj} inside of
> Table[stuff,rowDim,colDim]
>
> but this generates an iterator error.
>
> Any suggestions would be most appreciated.
>
> 	Greg
>
>

```

• Prev by Date: Re: Table Iterators
• Next by Date: Re: Table Iterators
• Previous by thread: Re: Table Iterators
• Next by thread: Re: Table Iterators