matrix
1 view (last 30 days)
Show older comments
Hi there, I have a square matrix and I want to find location of the maximum and minumum in each row.
EDITED!
0 Comments
Accepted Answer
Andrei Bobrov
on 23 May 2012
EDIT
A = rand(5)
[id,id] = sort(A,2)
minrowloc = id(:,1)
maxrowloc = id(:,end)
0 Comments
More Answers (0)
See Also
Categories
Find more on Matrices and Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!