finding the index of a row with a maximum value

6 visualizzazioni (ultimi 30 giorni)
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?

Risposta accettata

Sean de Wolski
Sean de Wolski il 2 Dic 2011
[junk, index] = max(Z(:,1));

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by