Permutations of binary variable
Posted: Wed May 01, 2013 9:36 am
Hi,
I am looking for a way to create permutations of a binary variable for different n. Assuming n=3:
0 0 0
1 0 0
0 1 0
0 0 1
1 1 0
0 1 1
1 0 1
1 1 1
Does anybody have a code snippet that could be of use?
Many thanks in advance
I am looking for a way to create permutations of a binary variable for different n. Assuming n=3:
0 0 0
1 0 0
0 1 0
0 0 1
1 1 0
0 1 1
1 0 1
1 1 1
Does anybody have a code snippet that could be of use?
Many thanks in advance