I have a problem with matlab where I need to find the maximum number in a matrix, and then find the next highest value in the matrix, which is not in the same row or column as the previous one.
My thought process is that I will find the maximum value in the matrix, and then find out which row and column it is in, and then set the remaining values ββin the row and column to 0. So far, I have it.
a=rand(5) [row,column]=find(a==max(max(a)))
I can find which row and column are max, but that's about it. Can someone help me with the next step or the best way to write this program? Thanks!
source share