How can I create bins in Matlab using predefined counts?

1 vue (au cours des 30 derniers jours)
Neha Binish
Neha Binish le 22 Nov 2020
Commenté : Neha Binish le 23 Nov 2020
I have a set of intervals and the count of the data that lie in that interval like it is given below -
INTERVALS COUNT
2 < T < 4 20
4 < T < 6 5
6 < T < 8 13
Is it possible to save this data as a bin on MATLAB?
I have tried using discretize() and histcounts() but it only allows me to specify the edges and not the bin count.

Réponse acceptée

Steven Lord
Steven Lord le 23 Nov 2020
histogram('BinEdges', [2, 4, 6, 8], 'BinCounts', [20, 5, 13]);

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by