octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #50619] textscan weird behaviour when reading


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #50619] textscan weird behaviour when reading a csv
Date: Sat, 25 Mar 2017 19:26:36 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #13, bug #50619 (project octave):

To the original poster, the following mods work for me (add new line to the
delimiters and increase the buffer size):


provaPath = 'testfile.csv'
file = fopen(provaPath);
formatSpec = '%s %s %s %s %s %s %s';
[col_headers, pos1] = textscan(file, formatSpec, 1, 'Delimiter', ";\n",
'BufSize', 4096);
formatSpec = '%f %f %f %f %f %f %f';
[logLine, pos2] = textscan(file, formatSpec, 1, 'Delimiter', ";\n", 'BufSize',
4096);
fclose(file);


It's not a bug fix, but if you keep your string lengths well below 4096, the
above should work.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50619>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]