I have 2 cell arrays of equal length, e.g.
>> alfa = {'a'; 'b'; 'c'; 'b'; 'a'; 'c'}
alfa =
'a' 'b' 'c' 'b' 'a' 'c'
>> beta = {'b'; 'd'; 'a'; 'd'; 'a'; 'a'}
beta =
'b' 'd' 'a' 'd' 'a' 'a'
and I want to find where the pairs are repeated, which pair is it and the index where the repeated pairs are located.
So, in this case the index 2 and 4 correspond to the repeated pair 'b' and 'd', and the index 3 and 6 correspond to the repeated pair 'c' and 'a'. It is important that I know which pair is it and all the indexes where this pair is repeated.
Thank you.
Best Answer