Find identical rows in matrices

1 次查看(过去 30 天)
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
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 个)

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

标签

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by