I want to build a matrix A of zeros and ones with dimension BxM.
Specifically, A contains all the possible dispositions of ones and zeros in M spaces considering also the order (hence, B=2^M).
for example when M=3
A=[1 1 1;
1 1 0;
1 0 1;
1 0 0;
0 1 1;
0 1 0;
0 0 1
0 0 0];
Best Answer