matlab - Compare and find strings in 2 dimensional array -
i new matlab , stuck in efficiently solving following problem. i have 2 arrays (both of them 2d) , want check array1 col col know how many elements appear in each col of array2 (compare col col) for example array1 --------- 'a1' 'b1' 'c1' 'd1' 'e1' 'f1' array2 ---------- 'a1' 'a1' 'b1' 'b1' 'a1' 'd1' 'd1' 'c1' 'd1' 'c1' 'c1' 'c1' 'b1' 'd1' 'd1' i trying following output 2 elements array1 col1 appear in array2 col1 2 elements array1 col1 appear in array2 col2 0 elements array1 col1 appear in array2 col3 1 elements array1 col1 appear in array2 col4 2 elements array1 col1 appear in array2 col5 0 elements array1 col2 appear in array2 col1 0 elements array1 col2 appear in array2 col2 1 elements array1 col2 appear in array2 col3 1 elements array1 col2 appea...