How to know the location of maximum value in a vector?

3 ビュー (過去 30 日間)
Meshooo
Meshooo 2013 年 11 月 6 日
コメント済み: Meshooo 2013 年 11 月 6 日
Dear All,
I have a vector such as A = [1 2 2 3 2 4 5 7 6 6 5 4]. As we can see that 7 is the maximum value of this vector. I want to know the location of this maximum value, in this example it is the 8th element. How find that?

採用された回答

Andrei Bobrov
Andrei Bobrov 2013 年 11 月 6 日
doc max
[value,index] = max(A);
  1 件のコメント
Meshooo
Meshooo 2013 年 11 月 6 日
Thank you very much...

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

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by