I have a very large text file composed of, in essence one row of numbers. Once I have reorganized the file into a matrix of, for example 500 x 10, I wish to create new matrices every 10 rows and have these save with their own title. A major problem I've experienced with my text file is that it's too big for Matlab, with an out of memory error appearing. This is why I need to separate each matrix into its own set of data. I have already turned a row of 1049600 numbers into a matrix of 1025 x 1024 but now the file is 50 of these sets in one file (1049600 x 50) and I need to create 50 1025 x 1024 matrices.

`fid = fopen('test0001.asc');Cell = textscan( fid, '%d', 'delimiter', ';');Data = cell2mat(Cell);N = 1024;Finish = reshape(Data, N, [])';`

The above is the code i had for the smaller files

I considered organizing the data into 51250 rows of 1024 and then creating a while ~ feof loop but this seems like it would require too much code and would thus be too slow. My thought was to have say:

` F1 = Data(1:1025, :); f2 = Data(1026:2051, :); .....Any thoughts at all would be much appreciated`

## Best Answer