N=10000;
r=rand(1,N);i=1;
a(1)=sum(r(1,:)<(1/6));
for k=2:6
    a(k)=sum( ( r(i,:)>((k-1)/6) ) .* (r(i,:)<(k/6)) );
end
figure(1); stem(a); 
figure(2); stem(a/10000); 
