How to assign variable width bins in histogram?
3 次查看(过去 30 天)
显示 更早的评论
I want to plot my data as a histogram but each bar in the histogram has a different bin width given by another data sequence.Thanks.
0 个评论
回答(1 个)
Guillaume
2017-11-8
Calculate the edges of your bins according to your other data sequence, pass that as the second input of histogram.
1 个评论
Steven Lord
2017-11-8
As an example of this technique see the "Specify Bin Edges of Histogram" example in the documentation for the histogram function. In that example there are two very wide bins at the ends of the histogram capturing the outliers in the data.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Histograms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!