Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Dynamic list creation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125785] Dynamic list creation
  • From: Berthold Hamburger <b-hamburger at artinso.com>
  • Date: Mon, 2 Apr 2012 04:25:59 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Hi,

I want to create a table of values dynamically based on the input of a 
variable that gives the dimension of the table.
The variable can take on integer values >0.

I give an example for a variable with value 3.
The table created would have to have the following format and I am 
wondering how to create a rule to do this:

{{2,0,0},{1,1,0},{1,0,1}},
{{0,2,0},{0,1,1},{1,1,0}},
{{0,0,2},{1,0,1},{0,1,1}}

The purpose of this table is a representation of indices that are used 
to create itorators for a multiple integration problem. The pattern is 
always the same disregarding the dimensions of the table.

Different strategies came to mind, like using diagonal matrices in the 
first place for the basic layout and then filling in the blanks via 
rules. However, I am quite stuck with this and can't find the proper way 
to go about it.

Regards

Berthold Hamburger

-- 
Berthold Hamburger - Cellist/Spain
http://www.artinso.com | http://www.astronomy.artinso.com |
http://www.artemis.artinso.com | Sent from Thunderbird



  • Prev by Date: Re: Facegrids at ticks
  • Next by Date: Re: typesetting derivative at a value
  • Previous by thread: Re: Facegrids at ticks
  • Next by thread: Re: Dynamic list creation