- #1
Sarah rob
- 16
- 0
If I have a list that contains 16 sublist (enclosed in 2 curly bracets),
L1 = {{{1, 1}, {1, 5}, {1, 8}}, {{2, 6}, {1, 10}, {0, 12}},
{{3, 2}, {1, 4}, {0, 15}}, {{1, 8}, {1, 14}, {2, 17}},
{{1, 2}, {2, 8}, {3, 12}}, {{2, 6}, {2, 11}, {2, 18}},
{{3, 6}, {1, 9}, {2,17}}, {{1, 8}, {3, 18}, {2, 19}} ... ...};
could I create a list from L1 that is made up of sublist 1, 2, 3, 4, 9, 10, 11,
12 and another that is made up of sublist 5, 6, 7, 8, 13, 14, 15, 16
I have had the idea of using Mod but don' t quite know how to
constuct it:
sub = 0;
sub++;
If[Mod[sub, 8, 1] < 4, Map[something?, L1], Map[something?,L1]]
L1 = {{{1, 1}, {1, 5}, {1, 8}}, {{2, 6}, {1, 10}, {0, 12}},
{{3, 2}, {1, 4}, {0, 15}}, {{1, 8}, {1, 14}, {2, 17}},
{{1, 2}, {2, 8}, {3, 12}}, {{2, 6}, {2, 11}, {2, 18}},
{{3, 6}, {1, 9}, {2,17}}, {{1, 8}, {3, 18}, {2, 19}} ... ...};
could I create a list from L1 that is made up of sublist 1, 2, 3, 4, 9, 10, 11,
12 and another that is made up of sublist 5, 6, 7, 8, 13, 14, 15, 16
I have had the idea of using Mod but don' t quite know how to
constuct it:
sub = 0;
sub++;
If[Mod[sub, 8, 1] < 4, Map[something?, L1], Map[something?,L1]]