How increase bufsize for importdata
Mostrar comentarios más antiguos
I am using the importdata function to import data from tab-separated and comma-separated text files. This works great for files up to at least 10Mb, but fails on files with an identical format in the 70Mb range with the following error.
Caused by: Error using ==> textscan Buffer overflow (bufsize = 1000005) while reading string from file (row 1, field 1). Use 'bufsize' option. See HELP TEXTSCAN.
Is there an easy way to increase bufsize directly in importdata call, without mucking around in the textscan function? I understand that as an alternative I can rewrite my code using textscan directly, but my current M-code file is working with importdata for smaller imports and I am looking for the simplest solution to allow import of larger data sets.
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 12 de Mzo. de 2011
0 votos
It looks to me as if it is thinking that the first line is more than 1000000 characters.
How long is the first line?
1 comentario
David
el 13 de Mzo. de 2011
Categorías
Más información sobre Large Files and Big Data 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!