matrix

1 Ansicht (letzte 30 Tage)
Mate 2u
Mate 2u am 23 Mai 2012
Hi there, I have a square matrix and I want to find location of the maximum and minumum in each row.
EDITED!

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 23 Mai 2012
EDIT
A = rand(5)
[id,id] = sort(A,2)
minrowloc = id(:,1)
maxrowloc = id(:,end)

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by