How to find the coordinates of starting, end point and peak from graph?

26 ビュー (過去 30 日間)
parag gupta
parag gupta 2019 年 8 月 2 日
コメント済み: Star Strider 2019 年 8 月 3 日
How to find the peak value, end point and distance between starting and end point?
x = linespace(-5,5); y = sqrt((36-x.^2)/9); figure() plot (x,y)

採用された回答

Star Strider
Star Strider 2019 年 8 月 2 日
Try this:
x = linspace(-5,5);
y = sqrt((36-x.^2)/9);
figure()
plot (x,y)
[onePeak,loc] = max(y) % Peak Value & Index
endPoint = y(end) % End Point Value
se_dist = max(x) - min(x) % Start To End Distance
producing:
onePeak =
1.9999
loc =
50
endPoint =
1.1055
se_dist =
10
  11 件のコメント
parag gupta
parag gupta 2019 年 8 月 3 日
Hey thank you so much @star :) thanksssssssss :)
Star Strider
Star Strider 2019 年 8 月 3 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by