MATLAB: Find common elements(?) in two arrays

array

For example,
A=[2 2 2; 0 0 1; 1 2 3], B=[1 2 3; 2 2 2; 2 2 0]
then I want to find the point of common elements between A,B
answer of the point is: (i,j)=(1,2),(3,2)
how can I find points?

Best Answer

[ii,jj]=find(A==B)
% you can add
out=[ii jj]