필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

remove entire rows from a matrix which consists of certain values found in another arrays ?

조회 수: 1 (최근 30일)
hi,
i have different vectors which i generate all possible combinations through choosing one from each of them them then i picked the unique unrepeated values
a=[2 3 4 5 6 7 33 20 19 18];
b=[9 10 11 12 13 14 34];
c=[8 9 10 11 35 21 33];
d=[6 7 8 34 15 16 17 25 26 27 28 29 30 31 32 36];
e=[3 4 5 25 26 27 28 22 23 24 37];
Sw=combvec(a,b,c,d,e)';
Sw(any(diff(sort(Sw,2),[],2)==0,2),:)=[];
now (Sw) is a 73209 x 5 matrix
i have certin values which i want to remove any row consists of them, no matter what their positions in the rows are.
the values i'd like to remove rows included them are:
c1=[10 11];
c2=[3 4];
c3=[4 5];
c4=[25 26];
c5=[26 27];
c6=[27 28];
i tried to use all loops and functions for same question here but i failed to remove the rows include those value
i think this is beacuse the position of numbers in rows differes from one row to another beside i need the rows removed to include the two numbers in each (c) together, not only one of them.. they both should be there to remove the row !!
please help

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by