This feels like a super basic question, but how do I find the intersection of two matrices in mata? Say I have two matrices A and B

Code:
A = (1, 2, 3)
B = (2, 3, 4)
What is then the best way to find the elements that occur in A and B?

Code:
(2, 3)
Is the only way to do this to loop over all values of one matrix and see if selectindex() produces anything?