A=[ 0 2.8284 5.6569;
2.8284 0 2.8284;
5.6569 2.8284 0;
1.4142 3.1623 5.8310;
5.0000 2.2361 1.0000];
[~, minIdx] = min(A, [], 2);
B = [(1:size(A, 1))', minIdx]
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!