필터 지우기
필터 지우기

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

조회 수: 13 (최근 30일)
Matt Rulli
Matt Rulli 2018년 4월 4일
댓글: Matt Rulli 2018년 4월 4일
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