title: Find rows with a specific value in their columns
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/10969521/find-rows-in-matrix-where-entries-match-certain-constraints">Find rows in matrix where entries match certain constraints?</a>  </p>
  </blockquote>
  
  
  
  <p>In Matlab, i have a matrix (MxN) and I want to find the rows whose entry in a specific column is equal to a specified value. For example, I have a matrix as follow:</p>
  
  <pre><code>   0    0   0   0   0   0   0   0   1   0
     1    0   0   0   0   0   1   0   0   1
     0    0   1   0   0   0   0   0   0   0
     0    0   0   1   0   0   0   0   1   0
     0    0   0   0   1   0   0   0   0   1
     0    0   0   0   0   0   0   0   0   0
     0    1   1   0   0   0   1   0   1   0
     0    0   0   0   0   0   0   0   0   1
     0    0   0   0   0   0   0   0   0   0
     0    0   0   0   0   0   0   0   0   1
  </code></pre>
  
  <p>I want to find the rows whose 7th element us equal to <code>1</code>. In this example, the result matrix should contains rows 2 and 7.</p>