How to assign variable width bins in histogram?
Ältere Kommentare anzeigen
I want to plot my data as a histogram but each bar in the histogram has a different bin width given by another data sequence.Thanks.
Antworten (1)
Guillaume
am 8 Nov. 2017
1 Stimme
Calculate the edges of your bins according to your other data sequence, pass that as the second input of histogram.
1 Kommentar
Steven Lord
am 8 Nov. 2017
As an example of this technique see the "Specify Bin Edges of Histogram" example in the documentation for the histogram function. In that example there are two very wide bins at the ends of the histogram capturing the outliers in the data.
Kategorien
Mehr zu Histograms finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!