through islocalmin we can find all the local minimas. but that is compatible with 2017 version of matlab and not with the previsous version of matlb
finding all local minima of histogram
13 ビュー (過去 30 日間)
古いコメントを表示
I have a histogram and I need to find all the local minima of that histogram.
回答 (1 件)
Bjorn Gustavsson
2019 年 9 月 27 日
If you read the help of the hist function you'll find:
N = HIST(Y) bins the elements of Y into 10 equally spaced containers
...and
[N,X] = HIST(...) also returns the position of the bin centers in X.
So that gives you a means to get both the histogram-counts and the centre-position.
From there you need to find the local maxima. That should be rather easy (provided you have no
exact repeat values in N at the local minima), use diff and check where that goes from negative to positive.
4 件のコメント
参考
カテゴリ
Help Center および File Exchange で Histograms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!