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

15 ビュー (過去 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 Center および File Exchange2-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