Finding of value coordinate

3 vues (au cours des 30 derniers jours)
MOHD UWAIS
MOHD UWAIS le 10 Jan 2022
Commenté : Walter Roberson le 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.

Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by