Data binning and frequency of data
2 次查看(过去 30 天)
显示 更早的评论
I am having a data for example X [56 65 59 98 97 35 54 42].I want to find how many of these data points falls in a given bin range.I also have to generate bin ranges from the data X.
Bin Frequency
- 50-55 ..... 0 % no data fall in this range
- 55-60 ..... 3 % three points fall in this range
- 60-65 ..... 1
- 65-70 ..... 0.....Please help me how to do this in Matlab?
0 个评论
采纳的回答
Azzi Abdelmalek
2013-8-18
编辑:Azzi Abdelmalek
2013-8-18
Edit
X= [56 65 59 98 97 35 54 42];
id=50:5:70
result=histc(X,id)
range=[id(1:end-1)' id(2:end)'];
out=[range result(1:end-1)']
2 个评论
Azzi Abdelmalek
2013-8-18
X= [56 65 59 98 97 35 54 42];
a=ceil(X/5)*5
id=min(a):5:max(a)
result=histc(X,id)
range=[id(1:end-1)' id(2:end)'];
out=[range result(1:end-1)']
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Descriptive Statistics and Visualization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!