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

13 次查看(过去 30 天)
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: [???????] = ???(?) ?

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Type Identification 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by