title: Finding all indices by ismember
body: <p>This is what is described in one of the examples for <a href="http://www.mathworks.com/help/matlab/ref/ismember.html"><code>ismember</code></a>:</p>
  
  <blockquote>
    <p>Define two vectors with values in common.<br/></p>
    
    <p><code>A = [5 3 4 2]; B = [2 4 4 4 6 8];</code></p>
    
    <p>Determine which elements of <code>A</code> are also in <code>B</code> as well as their corresponding locations in <code>B</code>.<br/></p>
    
    <p><code>[Lia,Locb] = ismember(A,B)</code></p>
  </blockquote>
  
  <p>The result is:</p>
  
  <pre><code>Lia =
       0     0     1     1
  
  Locb =    
       0     0     2     1
  </code></pre>
  
  <p>The element in <code>B</code> with the lowest index that matches <code>A(3)</code> is <code>B(2)</code>. <code>A(4)</code> equals <code>B(1)</code>. Is there a way by which we could find <em>all</em> the indices of the elemets of <code>B</code> matching the same element in <code>A</code>?</p>