- #1
PaulaS
- 19
- 0
Hello there,
Let's say I have the following array:
(what interests me in the array is the first column)
1 5 9
1 4 9
1 8 9
1 9 6
2 5 6
2 4 8
2 4 7
2 6 9
2 3 0
2 0 4
3 5 8
3 4 8
3 9 8
4 8 5
4 8 9
4 8 5
4 3 9
4 8 7
5 8 9
5 8 9
5 4 8
5 7 8
5 6 2
... and so on
The first columns starts with either 1 or 2 or 3 or 4 or 5.
The thing that I want to do is to extract all the rows that start with 1, separately along with all the rows that start with 2, and so on ...
So in the end, according to the above example, I'll have 5 'sub'arrays:
The first is for the columns that start with 1.
The second is for the columns that start with 2.
and so on ...
So this is it.
HOWEVER, my array has 12332 rows and I will have more than 20 'subarrays'. Plus, I want to name each one differently, since later on I'll have to call each subarray on its own.
How can I do it?
I hope I made it as clear as possible.
Let's say I have the following array:
(what interests me in the array is the first column)
1 5 9
1 4 9
1 8 9
1 9 6
2 5 6
2 4 8
2 4 7
2 6 9
2 3 0
2 0 4
3 5 8
3 4 8
3 9 8
4 8 5
4 8 9
4 8 5
4 3 9
4 8 7
5 8 9
5 8 9
5 4 8
5 7 8
5 6 2
... and so on
The first columns starts with either 1 or 2 or 3 or 4 or 5.
The thing that I want to do is to extract all the rows that start with 1, separately along with all the rows that start with 2, and so on ...
So in the end, according to the above example, I'll have 5 'sub'arrays:
The first is for the columns that start with 1.
The second is for the columns that start with 2.
and so on ...
So this is it.
HOWEVER, my array has 12332 rows and I will have more than 20 'subarrays'. Plus, I want to name each one differently, since later on I'll have to call each subarray on its own.
How can I do it?
I hope I made it as clear as possible.