Suppose I have a cell array
C = {[1; 2; 3]; [1; 2; 3; 4]; [1; 2]};c{:}ans = 123ans =1234ans=12 % where any digit won't repeat in the individual cell.
I need to find out the number of occurrences of each pair. Expected output:
Pair(1,2) = 3 occurences; Pair(1,3) = 0;Pair(1,4) = 0;Pair(2,1) = 0;Pair(2,3) = 2;Pair(2,4) = 0;Pair(3,1) = 0;Pair(3,2) = 0;Pair(3,4) = 1;
How can I find it?
Best Answer