Histogram with log Bin width
120 次查看(过去 30 天)
显示 更早的评论
I have a single column vector with values ranging from 0 to about 400 000.
I need to make a histogram from this data, which has a logarithmically changing bin size.
The height values in each bin should also be divided with the corresponding bins width.
How can this be done?
Advice would be appreciated,
Thanks
0 个评论
采纳的回答
Sean de Wolski
2020-8-3
x = rand(1,10000)*100000;
bins = 10.^(0:5);
histogram(x, bins);
set(gca, "XScale", "log")
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Histograms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!