本文介绍了直方图中的MATLAB bin设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想更改数据在构建的直方图中的分布方式.我的直方图看起来像
I want to change how data are distributed in the histogram that I built.My histogram looks like
但是我希望它看起来像
我设置了
bins1=[10,30,50,70];
hist(data,bins1)
如何像第二个图中那样排列垃圾箱?
How can I arrange the bins as in the second figure?
推荐答案
使用histc
代替hist
. histc
允许您定义边缘,而hist
使用第二个输入参数作为中心.
Use histc
instead of hist
. histc
allows you to define the edges while hist
uses the second input parameter as centers.
这篇关于直方图中的MATLAB bin设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!