problem with histogram, adds last bins
古いコメントを表示
Hi all, i have this histogram which on x-axis have values from angles -90:90 and i also have a threshold thresh= -4

I want to split the histogram into two. The one down form the thresh and the other upper the thresh, so i write the above code:
>> h1=histogram([lines.theta],'BinEdges', -90 : thresh ,'EdgeColor','r');
The problem is tha the last bin is added with the previous one.
For example :
the bin -6 has value 8 which is correct,
the bin -5 has value 13 but the histogram shows that has round 23 because it adds the bins of -5 and the bins of -4. Bin -4 has value 10 so 10+13.
This is happenig whatever right limiit of histogram is. The last bin it is added with the previous one

Has anyone any idea why this is happening?
Also do you know how to put the edges of x-axis under each bin? Because as you can see histogram displays now the range each bin.
1 件のコメント
pasta pontikaki
2019 年 4 月 12 日
編集済み: pasta pontikaki
2019 年 4 月 12 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Histograms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
