get common rows from 2 matrices

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]

 Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 16 de Nov. de 2017
C = intersect(A,B,'rows')

Más respuestas (0)

Categorías

Más información sobre Data Types en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 16 de Nov. de 2017

Comentada:

el 14 de Oct. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by