Comparing two matrices and obtain the un-repeated rows ?

1 回表示 (過去 30 日間)
Abdelwahab Fawzy
Abdelwahab Fawzy 2016 年 9 月 9 日
回答済み: Thorsten 2016 年 9 月 9 日
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 ]

採用された回答

Thorsten
Thorsten 2016 年 9 月 9 日
A(~ismember(A, B, 'rows'), :)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by