Code covered by the BSD License
% Both turned out to look the same %generates a random number then represents in base two %b=randint(1,1,[0,1048575]); a(end,:)=num2matrix(dec2bin(b,20)); %generates 20 random zeros and ones %a(end,:)=randint(1,20);
Contact us at files@mathworks.com