Find common elements(?) in two arrays

5 次查看(过去 30 天)
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?

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-6-24
编辑:Azzi Abdelmalek 2013-6-24
[ii,jj]=find(A==B)
% you can add
out=[ii jj]

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by