Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

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

1 visualizzazione (ultimi 30 giorni)
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

Risposte (0)

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by