How to manipulate single lines in text files without writing the entire file?
Mostrar comentarios más antiguos
Hi all,
I need to manipulate single lines in large (~500 MB) text files within a loop. Since reading, manipulating and writing is too time consuming, I am looking for an easier and faster way to manipulate the files. One option is using MS Excel via the actxserver - function. However Excel is limited to about 1 mio lines, which is too little for my purpose.
Hope somebody can help!
Respuestas (1)
per isakson
el 12 de Mzo. de 2015
0 votos
If the file has a fixed (and simple) format and "manipulating" doesn't change the size of the file, memmap might be the best way to implement something really fast. See memmap, Map memory for low-level memory read and write operations.
Categorías
Más información sobre Text Files 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!