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 天)
显示 更早的评论
采纳的回答
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!