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

조회 수: 14 (최근 30일)
Amy Topaz
Amy Topaz 2022년 4월 14일
편집: Matt J 2022년 4월 14일
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에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by