title: MATLAB: compare elements in arrays
body: <p>suppose there are arrays A and B, both of which can have any arbitrary numbers and size. for example </p>
  
  <pre><code>A=[1 2 3]
  B=[4 8 52 7 10]
  </code></pre>
  
  <p>i was wondering if there was any way to check if any of the elements in A are contained in B without using a loop? Once again, the numbers and size of the array will be arbitrary so i can't hard code it. Any help and input would be appreciated. Thanks!</p>