MATLAB: I have two binary array 10011 and 01010, i want compare each binary and find the number of different and similar bits

.m

  • bold*

Best Answer

binary1 = 1st binary char vector
binary2 = 2nd binary char vector
number_of_similar_bits = sum(binary1==binary2);