How to get bin counts from max(histcount_plot)
古いコメントを表示
I have a histcount plot which uses two different vectors. I called them 'Peak' and 'Bin'. The 'Bin' is obviously bins and 'Peak' is the data that goes in each bin. So then I made a histcount; Cnts=histcounts(Peak,Bin). Now I need a way to find the peak that this histcount will give. By peak, I mean finding the highest count and then find the corresponding bin number. I then need to plot those along with the histcount which I can do using the 'hold' command. I'm just having a problem with finding the Bin number that has the highest counts.
採用された回答
その他の回答 (1 件)
Jacob Ziesenis
2016 年 12 月 5 日
I would try:
find(N==max(N))
1 件のコメント
Walter Roberson
2016 年 12 月 5 日
Note: this can give you multiple outputs, if the maximum happens to be duplicated.
カテゴリ
ヘルプ センター および File Exchange で Data Distribution Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!