|
都到这一步了,你居然还能做不出答案...
- function fff
- clc
- B=nchoosek(1:8,4);
- A=zeros(size(nchoosek(1:8,4),1),8);
- for i=1:length(A)
- A(i,B(i,:))=1;
- end
- A
复制代码
=========
运行结果:
=========
- A =
- 1 1 1 1 0 0 0 0
- 1 1 1 0 1 0 0 0
- 1 1 1 0 0 1 0 0
- 1 1 1 0 0 0 1 0
- 1 1 1 0 0 0 0 1
- 1 1 0 1 1 0 0 0
- 1 1 0 1 0 1 0 0
- 1 1 0 1 0 0 1 0
- 1 1 0 1 0 0 0 1
- 1 1 0 0 1 1 0 0
- 1 1 0 0 1 0 1 0
- 1 1 0 0 1 0 0 1
- 1 1 0 0 0 1 1 0
- 1 1 0 0 0 1 0 1
- 1 1 0 0 0 0 1 1
- 1 0 1 1 1 0 0 0
- 1 0 1 1 0 1 0 0
- 1 0 1 1 0 0 1 0
- 1 0 1 1 0 0 0 1
- 1 0 1 0 1 1 0 0
- 1 0 1 0 1 0 1 0
- 1 0 1 0 1 0 0 1
- 1 0 1 0 0 1 1 0
- 1 0 1 0 0 1 0 1
- 1 0 1 0 0 0 1 1
- 1 0 0 1 1 1 0 0
- 1 0 0 1 1 0 1 0
- 1 0 0 1 1 0 0 1
- 1 0 0 1 0 1 1 0
- 1 0 0 1 0 1 0 1
- 1 0 0 1 0 0 1 1
- 1 0 0 0 1 1 1 0
- 1 0 0 0 1 1 0 1
- 1 0 0 0 1 0 1 1
- 1 0 0 0 0 1 1 1
- 0 1 1 1 1 0 0 0
- 0 1 1 1 0 1 0 0
- 0 1 1 1 0 0 1 0
- 0 1 1 1 0 0 0 1
- 0 1 1 0 1 1 0 0
- 0 1 1 0 1 0 1 0
- 0 1 1 0 1 0 0 1
- 0 1 1 0 0 1 1 0
- 0 1 1 0 0 1 0 1
- 0 1 1 0 0 0 1 1
- 0 1 0 1 1 1 0 0
- 0 1 0 1 1 0 1 0
- 0 1 0 1 1 0 0 1
- 0 1 0 1 0 1 1 0
- 0 1 0 1 0 1 0 1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