I want removing elements of a table. For example, I have the next table:
data = {{0, 3}, {1, 3}, {2, 5}, {4, 2}, {5, 1}, {6, 8}, {7, 4}};
and I want removing all elements where the 1st element of sublist is between 6 and 2 for I obtain this new table:
data = {{0, 3}, {1, 3}, {6, 8}, {7, 4}};
The next code don´t work:
DeleteCases[data, Flatten[Select[data, 6 > #[[1]] > 2 &]]]
If only I want removing one element (for example {0,3}), the code work:
DeleteCases[data, Flatten[Select[data, 1 > #[[1]] >= 0 &]]]
How can I remove elements where the 1st element of sublist is between two values?.
Select
? E.g.Select[data, Not[6 > #[[1]] > 2] &]
. $\endgroup${6,8}
is left but{2,5}
is not. $\endgroup$