フィルターのクリア

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)
  1 件のコメント
Matt Rulli
Matt Rulli 2018 年 4 月 4 日
PERFECT! Thanks so much!!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Identification についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by