samer@4: % binary - return array contain binary sequece over N columns samer@4: % samer@4: % binary :: N:natural -> [[2^N,N]->{0,1}]. samer@4: % samer@16: % note: returns an array of uint32 samer@4: samer@4: function B=binary(N) samer@4: samer@4: M=2^N; samer@4: B=zeros(M,N,'uint8'); samer@4: b=1:N; samer@4: for i=1:M samer@4: B(i,:)=bitget(uint32(i-1),b); samer@4: end