equal elements in historgam bins
显示 更早的评论
According to the help menu:
Calculate four evenly spaced quantiles.
y = quantile(x,4)
I want 10 bins with equal elements in each bin I tried :
y=quantile(x,10)
then
[counts,Id] = histc(x,y)
I received
counts=[3131
3130
3130
3130
3131
3130
3130
3130
3131
0]
and
Id=[ 0
1
2
3
4
5
6
7
8
9]
The issue is that the groups are 10 (0 to 9) but 3130 x 10 is not equal to the vector size of 34443x1. I a missing something here. as the size of each bin should be around 3443 and not 3130. Kindly, could you please spot the error and divide the histogram to 10 bins with equal elements?
1 个评论
Image Analyst
2015-8-6
34443 is not a multiple of 10 so how could all the bins have equal numbers in them?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!