title: Value comparison of matrix elements in MATLAB
body: <p>Say I have a 256 by 256 matrix. I would like to replace any values that are 'greater' or 'equal' to 10 with 1 and make the rest 0 i.e. (values &lt; 10). </p>
  
  <p>For example, </p>
  
  <pre><code>2   3 6 15 24 32 1  7  39 10 ....
  
  1   5 7 11 19 10 20 28 9 ........
  
  10 24 6 29 10 25 32 10 ..........
  
  .................................
  
  .................................
  </code></pre>
  
  <p>and I want the output to be:</p>
  
  <pre><code>0 0 0 1 1 1 0 0 1 1 ............
  
  0 0 0 1 1 1 1 1 0 ..............
  
  1 1 0 1 1 1 1 1 ................
  
  ................................
  
  ................................
  </code></pre>
  
  <p>How can I do it?</p>