title: indexing where conditions are true in an array, then make into new variable
body: <p>Matlab.</p>
  
  <p>Suppose i have the following:</p>
  
  <pre><code>a=randi(675,2000,1);
  </code></pre>
  
  <p>where <code>"a"</code> is a <code>2000x1</code> array of random integers with the highest one being <code>675</code>.  I would like to find all values greater than <code>150</code> and put them (however many) into a new array "b".<br>
  What I have tried so far: letting <code>b=(a&gt;150)</code>, this gives me a logical array, not what i want.
   I tried <code>[row,col]=find(a&gt;150)</code>, this gives me the locations where the condition is true, but how do I then make a new variable "b" out of that?</p>
  
  <p>Thank You.</p>