How to indicate the maximum value in the plotted curve in matlab?

9 次查看(过去 30 天)
How to indicate the maximum value of the curve in a plotted curve in matlab

回答(1 个)

Matt J
Matt J 2022-4-14
编辑:Matt J 2022-4-14
For example;
x=-2:2;
y=-x.^2+2;
[~,i]=max(y);
plot(x,y,x(i),y(i),'o'); legend('Plot','Maximum Point'); axis padded

类别

Help CenterFile Exchange 中查找有关 Fit Postprocessing 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by