morebins
增加直方图的 bin 数量
说明
示例
增加直方图的 bin 数量
绘制由 1,000 个随机数构成的直方图并返回直方图对象的句柄。
x = randn(1000,1); h = histogram(x)
h = Histogram with properties: Data: [1000x1 double] Values: [3 1 2 15 17 27 53 79 85 101 127 110 124 95 67 32 27 16 6 6 4 1 2] NumBins: 23 BinEdges: [-3.3000 -3.0000 -2.7000 -2.4000 -2.1000 -1.8000 -1.5000 -1.2000 -0.9000 -0.6000 -0.3000 0 0.3000 0.6000 0.9000 1.2000 1.5000 1.8000 2.1000 2.4000 2.7000 3 3.3000 3.6000] BinWidth: 0.3000 BinLimits: [-3.3000 3.6000] Normalization: 'count' FaceColor: 'auto' EdgeColor: [0 0 0] Show all properties
使用 morebins
增加直方图中的 bin 数量。
morebins(h); morebins(h)
ans = 29
输入参数
h
— 输入直方图
histogram
对象 | histogram2
对象
输入直方图,指定为 histogram
或 histogram2
对象。
h
不能是分类直方图。
direction
— 要增加 bin 数量的方向
'both'
(默认) | 'x'
| 'y'
要增加 bin 数量的方向,指定为 'x'
、'y'
或 'both'
。指定 'x'
或 'y'
以仅增加该方向的 bin 数量,其他方向的 bin 数量保持不变。
输出参数
N
— bin 数量
标量 | 向量
bin 数量,以标量或向量形式返回。N
是增加后的新的直方图的 bin 数量。对于二元直方图,N
是二元素向量 [nx ny]
。
版本历史记录
在 R2014b 中推出
另请参阅
histogram
| histcounts
| histogram2
| histcounts2
| fewerbins
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)