Comparing two matrices and obtain the un-repeated rows ?

조회 수: 3 (최근 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 CenterFile Exchange에서 Matrix Decomposition에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by