Currently i am manually entering the values into array, sign_array(a, b, c). Where c is the level number. So see my output below, where c = 1 there are only two inputs to the array. When c = 2 (or level 2) there are 4 inputs. Level 3 = 8 inputs, level 4 there are 16 inputs. But writing these all out is getting very tiresome.
I am really struggling with this. I need to write to an array all combinations of 1 or 2, and looking for an output of:
1
2
1, 1
1, 2
2, 1
2, 2
1, 1, 1
2, 1, 1
1, 2, 1
1, 1, 2
2, 2, 1
2, 1, 2
1, 2, 2
2, 2, 2
1, 1, 1, 1
2, 1, 1, 1
etc
Please see below how far I got, but have no idea what to do, to distinguish between a 1 or a 2. Any help would be greatly appreciated. At the moment i am manually putting in the combinations myself, but I its getting far to big the more dimensions I have.
I don't mind have a for loop for each level creation.
levels_to_use = 4
for i = 1 to levels_to_use ^ 2
for j = 1 to levels_to_use
' in here how to chose between 1 or 2
sign_array(i, j, levels_to_use) = 1
next
next
