title: How do i set a row within a matrix to 0?
body: <p>I have a matlab problem where I need to find the maximum number in a matrix, and then find the next greatest value in the matrix that is not in the same row or column as the previous one. </p>
  
  <p>My thought process is that I will find the maximum value in the matrix and then figure out which row and column it is in and then set the rest of the values in the row and column to 0. so far I have this. </p>
  
  <pre><code>a=rand(5)
  
  [row,column]=find(a==max(max(a)))
  </code></pre>
  
  <p>I can find which row and column the maximum is but that is about it. Can somebody help me with the next step or a better way to go about writing this program? Thank you!</p>