Hi,
I have a big array of data stored in a file named as 'A.dat'. I would like to split it into many small files (B11.dat, B12.dat, …B21.dat ,B22.dat, …) with each contains a small data block with size (N X M).
A direct way to deal with it is to read all the data into a big array A, then try to save
A( (n-1)*N+1 : n*N, (m-1)*M+1 : m*M ) )
to file Bnm.dat conresponding to block (n,m)
But I feel this is too clumsy. There should be a better method to do the same thing. Would anyone please comment on it?
Thanks a lot
I have a big array of data stored in a file named as 'A.dat'. I would like to split it into many small files (B11.dat, B12.dat, …B21.dat ,B22.dat, …) with each contains a small data block with size (N X M).
A direct way to deal with it is to read all the data into a big array A, then try to save
A( (n-1)*N+1 : n*N, (m-1)*M+1 : m*M ) )
to file Bnm.dat conresponding to block (n,m)
But I feel this is too clumsy. There should be a better method to do the same thing. Would anyone please comment on it?
Thanks a lot