![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/972460/image.png)
Hello I need a code that gives me the local minimum of a histogram please ?
2 ビュー (過去 30 日間)
古いコメントを表示
I created 12 histograms for 12 frames and I need to get the local minimums of these histograms.
0 件のコメント
回答 (1 件)
Mathieu NOE
2022 年 4 月 21 日
hello
maybe this
the local minima are the red diamonds
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/972460/image.png)
x = randn(1000,1);
h = histogram(x);
Values = h.Values;
BinCounts = h.BinCounts;
BinEdges = h.BinEdges;
BinWidth = h.BinWidth;
centers = BinEdges(2:end) - BinWidth/2;
% find min values
ind = islocalmin(Values);
hold on
plot(centers(ind),Values(ind),'dr');
hold off
12 件のコメント
Image Analyst
2022 年 5 月 9 日
So the "why you need it" is a closely held secret? You basically said you need it because you need it. Let me challenge you and say that you don't need it to do whatever mysterious thing you're attempting to do. Prove me wrong.
参考
カテゴリ
Help Center および File Exchange で Histograms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!