I have 6 matrix, each with 2 rows. the number of combinations that can be generated are 2^6=64 how can I generate the set of all possible combinations of the rows of each matrix such that no 2 rows of one matrix appear in one combination for example
P1=[1 0 0 1 0 1 1;1 1 0 0 1 0 1];P2=[0 1 1 1 0 0 1;1 0 1 0 1 1 0];P3=[1 0 0 1 1 0 0;0 1 1 0 0 0 1];P4=[1 0 0 0 1 0 1;0 1 0 1 0 1 0];P5=[1 1 0 0 0 1 0;1 1 0 0 1 0 1];P6=[0 1 0 0 0 1 1;1 1 0 1 0 1 0];
these are set of matrices. the possible combination can be (P1R1,P2R1,P3R1,P4R1,P5R2,P6R1)..I tried combvec but it gave one complete matrix by combining all. Is there any function in matlab or any code?
Best Answer