How to assign variable width bins in histogram?

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.

답변 (1개)

Guillaume
Guillaume 2017년 11월 8일

1 개 추천

Calculate the edges of your bins according to your other data sequence, pass that as the second input of histogram.

댓글 수: 1

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.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Histograms에 대해 자세히 알아보기

태그

질문:

2017년 11월 8일

댓글:

2017년 11월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by