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=[3131313031303130313131303130313031310]
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 34443×1. 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?
Best Answer