I have a vector of Cartesian indexes, for example:
temp = [CartesianIndex(3, 1), CartesianIndex(2, 2), CartesianIndex(6, 3), CartesianIndex(3, 4),
CartesianIndex(1, 5), CartesianIndex(5, 6), CartesianIndex(1, 7), CartesianIndex(1, 8),
CartesianIndex(4, 9), CartesianIndex(1, 10), CartesianIndex(2, 11), CartesianIndex(6, 12),
CartesianIndex(1, 13)]
I would like to split this vector into two vectors. The first vector collects all indexes on the first row, which is
v1 = [CartesianIndex(1, 5), CartesianIndex(1, 7), CartesianIndex(1, 8), CartesianIndex(1, 10), CartesianIndex(1, 13)]
Then, the second vector collects all the remaining indexes. How should I do it? Thank you very much.