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

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

[Octave-bug-tracker] [bug #35852] fscanf does not read full file


From: jwiebe
Subject: [Octave-bug-tracker] [bug #35852] fscanf does not read full file
Date: Fri, 16 Mar 2012 18:09:54 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2

Follow-up Comment #6, bug #35852 (project octave):

The original file was too large to upload so I truncated it. Either way I run
into the same problem in v3.6.0. The file has 9876 lines, but v3.6.0 will only
read 649 lines if I suppress output with a semicolon or 2716 lines if I don't
use the semicolon.  Using load, I get 5139 lines.  Using v3.2.4 fscanf reads
all 9876 lines. 

octave:3> fid=fopen('sample_short.txt', 'rt');
octave:4> data=fscanf(fid,'%f', [3, inf])';
octave:5> size(data)
ans =

   649     3

octave:6> a=load('sample_short.txt');
octave:7> size(a)
ans =

   5139      3


octave-3.2.4.exe:2> fid=fopen('sample_short.txt', 'rt');
octave-3.2.4.exe:3> data=fscanf(fid,'%f', [3, inf])';
octave-3.2.4.exe:4> size(data)
ans =

   9876      3


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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