clear all
load count.dat
c3 = count(:,3); % 第三列數據
c3NaNCount = sum(isnan(c3));
h = histogram(c3,10); % 直方圖,橫座標爲值,縱座標爲組數
N = max(h.Values); % 求最大值
mu3 = mean(c3); % 求平均值
sigma3 = std(c3); % 求均方差
hold on
plot([mu3 mu3],[0 N],'r','LineWidth',2) % Mean
X = repmat(mu3+(1:2)*sigma3,2,1);
Y = repmat([0;N],1,2);
plot(X,Y,'Color',[255 153 51]./255,'LineWidth',2) % Standard deviations
legend('Data','Mean','Stds')
hold off