How to find the corresponding value?

Hello,
a = [ 1 2 3 6 8 4 ]
b = [10 11 12 13 14 15]
maxa= max(a)
bb = 14;
in this case, I want to find bb which correspond to the maximum value of a.
(because 'max(a)' located in the fifth, so I want to indicate the fifth value of the 'b')
how to do it?

 採用された回答

madhan ravi
madhan ravi 2020 年 6 月 12 日
編集済み: madhan ravi 2020 年 6 月 12 日

0 投票

[Max, Where] = max(a);
b(Where)

1 件のコメント

hj lee
hj lee 2020 年 6 月 12 日
Thank you so much!
[ , ] is expressing the data sequence?

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGet Started with MATLAB についてさらに検索

製品

タグ

質問済み:

2020 年 6 月 12 日

コメント済み:

2020 年 6 月 12 日

Community Treasure Hunt

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

Start Hunting!

Translated by