01
帮助文档:
intersect Set intersection.
C = intersect(A,B) for vectors A and B, returns the values common to
the two vectors with no repetitions. C will be sorted.
C = intersect(A,B,'rows') for matrices A and B with the same
number of columns, returns the rows common to the two matrices. The
rows of the matrix C will be in sorted order.
[C,IA,IB] = intersect(A,B) also returns index vectors IA and IB such
that C = A(IA) and C = B(IB). If there are repeated common values in
A or B then the index of the last occurrence of each repeated value is
returned.
[C,IA,IB] = intersect(A,B,'rows') also returns index vectors IA and IB
such that C = A(IA,:) and C = B(IB,:).
[C,IA,IB] = intersect(A,B,'stable') for arrays A and B, returns the
values of C in the same order