问题描述: 如何用matlab生成从zeros(6)到ones(6)的矩阵我就是想生成所有6阶0-1矩阵. 1个回答 分类:综合 2014-10-28 问题解答: 我来补答 a=eye(6);per=perms([1 2 3 4 5 6]);T=length(per);ccount=0;for i=1:T temp = a(per(i,:),:); if min(min(sum(temp)==1),min(min(temp==(temp'))))==1 disp(temp); ccount=ccount+1; endenddisp(ccount); 展开全文阅读