夜的独白

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

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

![](https://img-blog.csdnimg.cn/20190513012107723.png?x-oss-
process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3NlZWs5Nw==,size_16,color_FFFFFF,t_70)

在这里插入图片描述

posted on 2021-07-08 12:04  夜的独白  阅读(384)  评论(0)    收藏  举报