finding the index of a row with a maximum value

1 回表示 (過去 30 日間)
Erik
Erik 2011 年 12 月 2 日
i am writing a program, and i need to find the row index of a maximum value. the column index is 1, and its a 15x15 matrix.
for i=Z(:,1); m=max(i);
now how do i find the row index of the maximum value?

採用された回答

Sean de Wolski
Sean de Wolski 2011 年 12 月 2 日
[junk, index] = max(Z(:,1));
  2 件のコメント
Erik
Erik 2011 年 12 月 2 日
thank you very much
Malik haseeb Haider
Malik haseeb Haider 2020 年 8 月 22 日
thank u so much

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by