help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[newbie] constructing a discrete dataset


From: Jean Dubois
Subject: [newbie] constructing a discrete dataset
Date: Wed, 29 Jan 2014 17:07:19 +0100

I'd like to generate every possible combination a b c d e f for three
possible values (1, 2, 3) of each variable
Something which starts like this:
1 1 1 1 1 1
1 1 1 1 1 2
1 1 1 1 1 3
1 1 1 1 2 1
1 1 1 1 2 2
1 1 1 1 2 3
1 1 1 1 3 1
1 1 1 1 3 2
1 1 1 1 3 3
1 1 1 2 1 1
1 1 1 2 1 2
1 1 1 2 1 3
1 1 1 2 2 1
1 1 1 2 2 2
1 1 1 2 2 3
1 1 1 2 3 1
1 1 1 2 3 2
1 1 1 2 3 3
.
.
.
Can anyone here suggest how this is best done in octave in a time
efficient manner (I suppose nested for-loops are a bad idea)?

thanks in advance
jean


reply via email to

[Prev in Thread] Current Thread [Next in Thread]