Borrar filtros
Borrar filtros

Find common elements(?) in two arrays

8 visualizaciones (últimos 30 días)
PJM
PJM el 24 de Jun. de 2013
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?

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 24 de Jun. de 2013
Editada: Azzi Abdelmalek el 24 de Jun. de 2013
[ii,jj]=find(A==B)
% you can add
out=[ii jj]

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by