matrix

Hi there, I have a square matrix and I want to find location of the maximum and minumum in each row.
EDITED!

 Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 23 de Mayo de 2012

1 voto

EDIT
A = rand(5)
[id,id] = sort(A,2)
minrowloc = id(:,1)
maxrowloc = id(:,end)

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 23 de Mayo de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by