%% Difference of Rows in Two Matrices
% Define two matrices with rows in common.

A = [7 9 7; 0 0 0; 7 9 7; 5 5 5; 1 4 5];
B = [0 0 0; 5 5 5];

%
% Find the rows from A that are not in B as well as the index vector ia, such that C = A(ia,:).

[C,ia] = setdiff(A,B,'rows')

% Copyright 2012 The MathWorks, Inc.