Effacer les filtres
Effacer les filtres

Find common elements(?) in two arrays

8 vues (au cours des 30 derniers jours)
PJM
PJM le 24 Juin 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?

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 24 Juin 2013
Modifié(e) : Azzi Abdelmalek le 24 Juin 2013
[ii,jj]=find(A==B)
% you can add
out=[ii jj]
  1 commentaire
PJM
PJM le 24 Juin 2013
thanks a lot!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by