Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #9353 > unrolled thread

Dynamic list creation

Started byBerthold Hamburger <b-hamburger@artinso.com>
First post2012-04-02 08:28 +0000
Last post2012-04-02 08:28 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Dynamic list creation Berthold Hamburger <b-hamburger@artinso.com> - 2012-04-02 08:28 +0000

#9353 — Dynamic list creation

FromBerthold Hamburger <b-hamburger@artinso.com>
Date2012-04-02 08:28 +0000
SubjectDynamic list creation
Message-ID<jlbo02$47c$1@smc.vnet.net>
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

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web