Filter löschen
Filter löschen

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

12 Ansichten (letzte 30 Tage)
Matt Rulli
Matt Rulli am 4 Apr. 2018
Kommentiert: Matt Rulli am 4 Apr. 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: [???????] = ???(?) ?

Akzeptierte Antwort

KSSV
KSSV am 4 Apr. 2018
[P_max, index] = max(P)
iwant = yourvariable(index)

Weitere Antworten (0)

Kategorien

Mehr zu Data Type Identification 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