snr=real(d)./T/sqrt(52);
[YS,XS]=hist(snr,1000);
[mu,sigma]=normfit(snr)
YN=sum(YS)*(XS(end)-XS(1))/(length(XS)-1)*normpdf(XS,mu,sigma);
bar(XS,YS)
hold on
plot(XS,YN,'r')

