I have in a matrix data that contains 0 and 'proper' data. I want to crete several matrixes (new ones) to separate the data from the zeros and get rid of these zeros.
So, here is a simple example:
data = 1 3 6 4
3 6 9 5
4 5 6 2
0 0 0 0
0 0 0 0
2 4 1 8
1 4 6 5
0 0 0 0
1 7 9 1
3 4 5 8
And i want to get in this case two matrixes that would be:
A =1 3 6 4
3 6 9 5
4 5 6 2
B= 2 4 1 8
1 4 6 5
C = 1 7 9 1
3 4 5 8
Obviously my data files have thousands of datapoint and i need to automat this.
Any ideas how to do it?