Borrar filtros
Borrar filtros

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

13 visualizaciones (últimos 30 días)
Matt Rulli
Matt Rulli el 4 de Abr. de 2018
Comentada: Matt Rulli el 4 de Abr. de 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: [???????] = ???(?) ?

Respuesta aceptada

KSSV
KSSV el 4 de Abr. de 2018
[P_max, index] = max(P)
iwant = yourvariable(index)

Más respuestas (0)

Categorías

Más información sobre Data Type Identification en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by