Consider the data
data = {{x1,y1,z1},{x2,y2,z2},{x3,y3,z3},{x4,y4,z4},{x5,y5,z5},{x6,y6,z6},...}
with N rows.
It can be divided into N/6 sets of 6 rows. I want to select a subdata obtained from the sets satisfying some specific requirement for 3rd rows of the sets, say data[[3+6*i]][[2]]>10
.
Example:
data = {{1,2,3},{1,9,6},{1,12,6},{1,5,6},{1,6,3},{1,5,5},{3,5,6},{1,10,6},{1,8,6},{1,4,6},{1,0,4},{1,3,6}}
The data contains 2 sets of 6 rows. In the first set we have data[[3]][[2]]>10, in the second set we have data[[9]][[2]]<10, and therefore after imposing the criterion data[[3 +6*i]][[2]]>10
we obtain
subdata = {{1,2,3},{1,9,6},{1,12,6},{1,5,6},{1,6,3},{1,5,5}}
Select[Partition[data, 6], #[[3, 2]] > 10 &]
$\endgroup$Select[Partition[data, 6], #[[3, 2]] > 10 &]~Flatten~1
. $\endgroup$