finding the index of a row with a maximum value

1 visualización (últimos 30 días)
Erik
Erik el 2 de Dic. de 2011
Comentada: Malik haseeb Haider el 22 de Ag. de 2020
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?

Respuesta aceptada

Sean de Wolski
Sean de Wolski el 2 de Dic. de 2011
[junk, index] = max(Z(:,1));
  2 comentarios
Erik
Erik el 2 de Dic. de 2011
thank you very much
Malik haseeb Haider
Malik haseeb Haider el 22 de Ag. de 2020
thank u so much

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by