Hello! I want to put in a descending order just the part upper the main diagonal in a symmetric matrix and to get the index of those elements. What should I change in this code?
function [values,i,j] = max(A,n)[a, linIdx] = sort(A(:),'descend');values = a(1:n);[i,j] = ind2sub(size(A),linIdx(1:n));
Best Answer