How I can write in code for the Maximum value of 'Y' from left hand side not from right hand side in following figure?
조회 수: 1 (최근 30일)
이전 댓글 표시
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1085680/image.jpeg)
댓글 수: 0
채택된 답변
Dyuman Joshi
2022년 8월 2일
Answering according to the image
x=[1 2 3 4 5 6 7 8 9 10 11 12];
y=[3 4 3 2 1 2 3 4 5 6 5 4];
plot(x,y)
locmax=islocalmax(y)
i=find(locmax,1)
maxy=y(i)
maxx=x(i)
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Filtering and Enhancement에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!