matrix

1 visualizzazione (ultimi 30 giorni)
Mate 2u
Mate 2u il 23 Mag 2012
Hi there, I have a square matrix and I want to find location of the maximum and minumum in each row.
EDITED!

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Matrices and Arrays in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by