【发布时间】:2012-05-13 05:51:28
【问题描述】:
如何使用 histfit() 在直方图上绘制均匀密度?有一个命令可以为正态分布和其他一些命令执行此操作,所以我必须操纵其中一个以使其均匀吗?
示例:
s4 = randn(50,1);
counts = [];
[counts(1,:) freq] = histc(s4, [-inf,-3]);
for n = 2:7
[counts(n,:) freq] = histc(s4, [-5+n,-4+n]);
end
[counts(8,:) freq] = histc(s4, [3,inf]);
counts(1:8)
histfit(s4).
如何实现统一直方图的 histfit?
s = rand(50,1);
[count freq]= hist(s,5);
histfit(s);
count
【问题讨论】:
-
换句话说,我正在寻找的是直方图顶部的直线(均匀)而不是钟形曲线(正常)。