get common rows from 2 matrices

9 次查看(过去 30 天)
i have two matrices of different sizes,
A = [450,37;477,38;464,39;450,40;493,40]
B = [461,37;477,38;450,40;483,39]
i wanted to get a new matrix C, which contains the common rows in A and B
C = [477,38;450,40]

采纳的回答

Andrei Bobrov
Andrei Bobrov 2017-11-16
C = intersect(A,B,'rows')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Types 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by