how to find and mark the value of local minimums in a graph of multiple data ?
1 回表示 (過去 30 日間)
古いコメントを表示
I have a graph of multiple data taken experimentally. Now I want to find the troughs of the graph. I want to show the value of local minimas in the graph. How do I do it?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/170383/image.png)
0 件のコメント
採用された回答
Birdman
2018 年 2 月 15 日
Try this:
x=randi([1 7],1,10);
y=randi([3,10],1,10);
plot(x);hold on;plot(y);
[~,idxX]=findpeaks(-x);
[~,idxY]=findpeaks(-y);
plot(idxX,x(idxX),'o');plot(idxY,y(idxY),'o')
hold off;
2 件のコメント
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!