I'm trying to generate a list in NetLogo that contains several different unique lists of 0 and 1. The number of 1s depends j and the number of lists depends on i. For example, I have these lines of code:
if (i = 4) and (j=1) [set mylist = [[1 0 0 0][0 1 0 0][0 0 1 0][0 0 0 1]]]
if (i = 4) and (j=2) [set mylist = [[1 1 0 0][1 0 1 0][1 0 0 1][0 1 1 0][0 1 0 1] [0 0 1 1]]]
that I wrote to make all possible unique combinations of 0 and 1 without any repetitions within the lists. I would like to be able to the same thing but for values of both i and j, ranging from 1-10. Is there an example of how to do this, or some sort of pseudocode algorithm that anyone knows of that I could check out? Thanks!