Histcounts including values beyond bin edges
4 次查看(过去 30 天)
显示 更早的评论
Hi - I feel this should be very simple but can't find the answer.
How do I use histcounts such that it includes values beyond the right- and left-most bin edges?
To be more clear, I want the first and last bins to include counts of values that are smaller than, and larger than, the extreme bin edges.
This doens't seem to be the default behaviour and I can't see how to change it.
Thank you
0 个评论
采纳的回答
Bruno Luong
2020-9-17
编辑:Bruno Luong
2020-9-17
Append -Inf/+Inf in your finite edges
2 个评论
Adam Danz
2020-9-18
If the min and max edge is the min and max of the data, then you probably want to replace the min & max edge with -/+inf rather than append the bin edge vector which would result in an empty bin-1 and the last bin would only represent the count for the max value of the data.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Distribution Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!