Effacer les filtres
Effacer les filtres

How do I find the associated x index for a max y value?

13 vues (au cours des 30 derniers jours)
Matt Rulli
Matt Rulli le 4 Avr 2018
Commenté : Matt Rulli le 4 Avr 2018
I'm working with a graph that compares load resistance values against power supplied, and I have the max y-value, but I need to find the corresponding x index so I can mark the high point of the graph.
Identifies the max y value: [P_max, index] = max(P); Need to find the corresponding x index so I can plot the max point: [???????] = ???(?) ?

Réponse acceptée

KSSV
KSSV le 4 Avr 2018
[P_max, index] = max(P)
iwant = yourvariable(index)

Plus de réponses (0)

Catégories

En savoir plus sur Data Type Identification 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