title: Compare arrays in matlab by elements
body: <p>I want to compare multiple arrays in MATLAB element-by-element; and if they equal at any position, increment the count. (i.e whole array need not be equal, whenever the comparison finds the elements equal for the FIRST time that is enough. Ex <code>A=[1 2 3]</code>, <code>B=[4 2 5]</code>, here at position <code>2</code> its equal.)</p>
  
  <p>I tried <code>isequal(A,B)</code>: that compares all the elements and returns Count <code>1</code> or <code>0</code>;
  but <code>isequal(A[i], B[i]);</code> does not work to compare numbers as element by element.</p>
  
  <p>Can you suggest any solution please..</p>