我想构建一个具有不等分箱(间隔)的直方图..Matlab 仅构建具有等分箱的直方图,就好像它是一个图表..!!!
请帮助我...非常感谢!!
最佳答案
这是一个例子:
x = randn(100,1)*3; %# some random data
e = [-10 -5 -3 -1 1 2 3 20]; %# edges of intervals: e(i) <= x < end(i+1)
c = histc(x,e); %# get count in each interval
bar(e, c, 'histc') %# bar plot
set(gca, 'xlim',[e(1) e(end)])
关于matlab - 如何用Matlab构造不等宽直方图?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2379230/