Effacer les filtres
Effacer les filtres

Comparing two matrices and obtain the un-repeated rows ?

2 vues (au cours des 30 derniers jours)
Abdelwahab Fawzy
Abdelwahab Fawzy le 9 Sep 2016
if i have two matrices A and B
where B is apart of A ,for example:
A=[ 1 2 ; 3 4 ; 5 6 ; 7 8 ; 9 10 ]
B=[ 7 8 ; 1 2 ; 9 10 ]
i want to compare between them and get matrix C where C = A without B
C=[ 3 4 ; 5 6 ]

Réponse acceptée

Thorsten
Thorsten le 9 Sep 2016
A(~ismember(A, B, 'rows'), :)

Plus de réponses (0)

Catégories

En savoir plus sur Multidimensional Arrays dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by