find the matching coordinates in two matrix

16 visualizaciones (últimos 30 días)
prashant singh
prashant singh el 14 de Sept. de 2017
Comentada: Sayand Sathish el 9 de Oct. de 2020
i have matrix containing certain x and y coordinates of images. I have another matrix which have x and y coordinates of images. I want to find which indexes are same by comparing two matrix. Something like:
A = [256 345; 300 356; 400 234; 454 345;100 200] B =[256 345;400 234;] , then the result matrix should be C =[1;0;1;0;0].
I know there is a direct approach like iterating through the matrices and comparing them . I want to know is there any easy and computationally less expensive way of doing this

Respuesta aceptada

prashant singh
prashant singh el 14 de Sept. de 2017
Using ismemeber function to solve this
  1 comentario
Sayand Sathish
Sayand Sathish el 9 de Oct. de 2020
It works. Thanks!
ismember(A,B,'rows');
is the exact command for anyone wondering

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by