フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

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

1 回表示 (過去 30 日間)
hossam eldakroury
hossam eldakroury 2019 年 2 月 26 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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