%
figure(1);clf;
n = 100000;
a = 6 ;
x=rand(a,n)-0.5;
y=sum(x,1);
m=mean(y);
s=std(y);
mm = hist(y,30);
mmax=max(mm);
hist(y,30)

hold on
t = -3:.01:3;
p = mmax*exp(-(t-m).^2/(2*s^2));
plot(t,p,'r','linewidth',3)
text(1.5,5000,['std=',num2str(s)])
text(1.5,6000,['N=',num2str(n)])
title('Sum of 6 uniform numbers')