%Together with invmap11, this function creates a matrix of all possible %states using binary for 11 possible binding sites function A=state11(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,:)=invmap11(binvect(i)); i=i+1; end