Filter löschen
Filter löschen

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

12 Ansichten (letzte 30 Tage)
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)

Akzeptierte Antwort

Star Strider
Star Strider am 2 Aug. 2019
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 Kommentare
parag gupta
parag gupta am 3 Aug. 2019
Hey thank you so much @star :) thanksssssssss :)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Interactive Control and Callbacks 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