Filter löschen
Filter löschen

get common rows from 2 matrices

9 Ansichten (letzte 30 Tage)
Elysi Cochin
Elysi Cochin am 16 Nov. 2017
Kommentiert: Hulya Kadioglu am 14 Okt. 2020
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]

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Data Types finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by