A=[1,2;1,3;1,4;1,5;2,4;2,3;2,5]
B=[2,4]
I want to omit B from matrix A
answer
A=[1,2;1,3;1,4;1,5;2,3;2,5]

 채택된 답변

madhan ravi
madhan ravi 2018년 11월 24일
편집: madhan ravi 2018년 11월 24일

0 개 추천

>> A=[1,2;1,3;1,4;1,5;2,4;2,3;2,5];
B=[2,4];
idx=ismember(A,B,'rows');
A = A(~idx,:)
A =
1 2
1 3
1 4
1 5
2 3
2 5
>>

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

질문:

NA
2018년 11월 24일

편집:

2018년 11월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by