find the matching coordinates in two matrix

조회 수: 16 (최근 30일)
prashant singh
prashant singh 2017년 9월 14일
댓글: Sayand Sathish 2020년 10월 9일
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

채택된 답변

prashant singh
prashant singh 2017년 9월 14일
Using ismemeber function to solve this
  댓글 수: 1
Sayand Sathish
Sayand Sathish 2020년 10월 9일
It works. Thanks!
ismember(A,B,'rows');
is the exact command for anyone wondering

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by