How to get the limits of the highest frequency bin in a histogram?

11 次查看(过去 30 天)
Hello,
Is it possible to get the limits of the highest frequency bin in a histogram?. For example, in the attached figure, I have a histogram of three bins where the width of each bin is 1 and the bin of highest frequency is the second bin which is [0,1]. So, I need to write lines of code that find the highest frequency range of values which is here [0,1].
Regards,

采纳的回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2019-11-24
[counts,binLocations]=hist(data);
%find the bins of max(counts)
Then previous value & next value are limits
  1 个评论
Sarah A
Sarah A 2019-11-24
[counts,binLocations]=hist(data);
maimum=round(max(binLocations));
minimum=round(min(binLocations));
Thank you :)

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Histograms 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by