Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个矩阵,比如说A = perms([1 2 3 4])。我有另一个矩阵,比如说B = [1 2 3 4; 4 3 1 2; 2 4 3 1]。如何从中删除行[1 2 3 4],[4 3 1 2]和[2 4 3 1](即行B)A?
A = perms([1 2 3 4])
B = [1 2 3 4; 4 3 1 2; 2 4 3 1]
[1 2 3 4]
[4 3 1 2]
[2 4 3 1]
B
A
谢谢!
This solution maintains the row order:
A(find(ismember(A, B, 'rows')),:) = [];