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?
댓글 수: 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에서 Directed Graphs에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!