Finding of value coordinate

1 Ansicht (letzte 30 Tage)
MOHD UWAIS
MOHD UWAIS am 10 Jan. 2022
Kommentiert: Walter Roberson am 10 Jan. 2022
For example,
x=-50:1:50;
y=4*x.^2+5;
plot(x,y,'*-')
How we can find x value corresponding to the minimum value of y.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 10 Jan. 2022
[~, idx] = min(y);
x(idx)

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB 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