I have two 1-d arrays (a and b) containing strings that I want to compare with the elements to get the output c, as shown below. I tried to convert it to install and compare, however this does not provide the correct solution. Also logical_xor does not work for a row. I can write a loop to do this, but then it defeats the goal of using arrays. What could be the best way to do this without a loop?
>> a array(['S', 'S', 'D', 'S', 'N', 'S', 'A', 'S', 'M'], dtype='|S1') >> b array(['T', 'I', 'D', 'N', 'G', 'B', 'A', 'J', 'M'], dtype='|S1') >> c array([False, False, True, False, False, False, True, False, True], dtype=bool)
source share