I have matrix A (1000x3) and matrix B (1200x3), is there an easy way to know what rows of matrix A already exist in Matrix B. Any help is appreciated

 채택된 답변

KSSV
KSSV 2022년 6월 8일
편집: KSSV 2022년 6월 8일

1 개 추천

REad about ismember
% Example
A = [1 1 1; 2 3 4; 5 5 5; 8 9 10];
B = [1 1 1;5 5 5];
[c,ia] = ismember(A,B,'rows') ;
A(c,:)
ans = 2×3
1 1 1 5 5 5

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

제품

릴리스

R2021b

태그

질문:

2022년 6월 8일

편집:

2022년 6월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by