Running out of memory
Mostrar comentarios más antiguos
Hi All,
I have a couple of data text files which I am extracting data of interest from.
The total text data files size is about 549 MB, which I am writing into a single text file and it comes to about 500 MB since I am disregarding some information in the text files.
When I try to write to read and write the output text file into an excel file;
1. The process consumes all my RAM (8G) and computer freezes
2. I got this error at the end
Error using xlswrite (line 219)
The specified data range is invalid or too large to write to the specified file format. Try writing to an XLSX file and use Excel A1
notation for the range argument, for example, ‘A1:D4’.
Error in Data_Overall_Ext_Dir (line 29)
xlswrite (output, data);
Is there any way I can handle this?
With limited number of files, the script works well but as the number of files (data size) increases, I have this issue.
Kindly help.
7 comentarios
Walter Roberson
el 6 de Feb. de 2017
Are you writing to a csv file? If so then do you need a text header line? Is there any text involved anywhere other a possible header line?
Theo Score
el 7 de Feb. de 2017
Theo Score
el 7 de Feb. de 2017
Editada: Theo Score
el 7 de Feb. de 2017
Theo Score
el 7 de Feb. de 2017
Walter Roberson
el 7 de Feb. de 2017
Sorting on the first column is not difficult. The maximum number of rows is a problem.
Given that you need to plot it using an an external tool (possibly Excel itself), what are the requirements of that graphing tool? For example if you need all of the points to be available at once then you aren't going to get anywhere because you just have too many rows for that.
I could make suggestions about dividing them to put them onto multiple sheets, or about putting them into multiple columns side by side, but unless there are key values in the data to break at, I would be guessing about where it would be acceptable to put the breaks. We cannot, though, just put all the columns side by side: you have 1000 files and 19 columns each would exceed the 16384 limit.
Theo Score
el 8 de Feb. de 2017
Editada: Theo Score
el 8 de Feb. de 2017
Walter Roberson
el 8 de Feb. de 2017
I would probably toss it all into perl...
Respuestas (1)
cr
el 6 de Feb. de 2017
0 votos
If xls format is not critical requirement, you may want to use fileIO operations and produce a csv (or some text delimited) format. Once a file text file is successfully generated it can be converted to xls using MS Excel.
1 comentario
Theo Score
el 7 de Feb. de 2017
Editada: Theo Score
el 7 de Feb. de 2017
Categorías
Más información sobre Get Started with MATLAB en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!