finding the index of a row with a maximum value

조회 수: 11 (최근 30일)
Erik
Erik 2011년 12월 2일
댓글: Malik haseeb Haider 2020년 8월 22일
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 CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by