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

15 Ansichten (letzte 30 Tage)
Amy Topaz
Amy Topaz am 14 Apr. 2022
Bearbeitet: Matt J am 14 Apr. 2022
How to indicate the maximum value of the curve in a plotted curve in matlab

Antworten (1)

Matt J
Matt J am 14 Apr. 2022
Bearbeitet: Matt J am 14 Apr. 2022
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

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by