Comparing two matrices and obtain the un-repeated rows ?

2 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by