How do I find the most frequently occurring range of values in a matrix?

9 views (last 30 days)
Hello, I have a set of values with the following distribution:
My goal is to extract the most frequent range in this data set. So, this specific part:
I am aware of the mode function, but as far as I am aware, this is only for finding the singular most frequent value in a data set. How could I extract the most common range of values (so in this case this would be from 100 to about 120 or something) and store these most common values in another array? Thanks.

Accepted Answer

David Hill
David Hill on 1 Feb 2022
use histcounts()

More Answers (0)

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!