Bining some data in 50 classes without knowing the limits

2 views (last 30 days)
Hello every body,
I have a huge amount of data ( 57000 nummbers ) and I need them to be devided into 50 groups between 0 and 25 ( bin width of 0.5) and I want to know how many nummbers are gathered in any interval. later I need to be able to make a graph out of this data.
what should I do?
Thanks

Answers (1)

Kevin Claytor
Kevin Claytor on 20 Nov 2014
Sounds like you're trying to make a histogram (hist in revisions prior to R2014b). Since you have specific bin locations, you might want to have a look at the sections on bin edges. You're edges would be something like [0, 0.5, 1.0, ... , 25] Although, if there are values outside this range, the last few bins will catch ALL the values lower or higher than their edge, so you might want to consider an overflow bin; [-1, 0, 0.5, ..., 25, 26]

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!