Creating combination of numbers with constraint (fixed sequence)
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi I am trying to solve a graph problem. I am unable to proceed solving the problem because of following:
I have a set of binary matrices
A = [2 3 4]; B = [1]; C = [1 2]; D = [2]; E = [2 5]; means
A = [A1 A2 A3]; B = [B1]; C = [C1 C2]; D = [D1]; E = [E1 E2];
I want to create a combination matrices using A,B, C, D, E matrices, however combination only has to be in sequential order from A to E: Results should be as follow: comb1 = [2 1 1 2 2]; means comb1 = [A1 B1 C1 D1 E1]
comb2 = [2 1 1 2 5]; means comb2 = [A1 B1 C1 D1 E2]
comb3 = [2 1 2 2 2]; means comb3 = [A1 B1 C2 D1 E1]
comb4 = [2 1 2 2 5]; means comb4 = [A1 B1 C2 D1 E2]
comb5 = [3 1 1 2 2];
comb6 = [3 1 1 2 5];
comb7 = [3 1 2 2 2];
comb8 = [3 1 2 2 5];
comb9 = [4 1 1 2 2];
comb10 = [4 1 1 2 5];
comb11 = [4 1 2 2 2];
comb12 = [4 1 2 2 5];
COULD YOU PLEASE LET ME KNOW IF THERE IS A SMART WAY TO GENERATE SUCH SEQUENTIAL COMBINATION??
THANKS
댓글 수: 0
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!