function A=state10(n) %where n is the number of binding sites, in this case 7 or fewer N=2^(n); %N is the number of possible states binvect= 0:(N-1); %converts enumberated 0 to N-1 into a 7 digit binary number i=0; for i=1:N A(i,:)=invmap10(binvect(i)); i=i+1; end