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

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

[Octave-bug-tracker] [bug #63353] Error in fscanf when maximum field wid


From: Rik
Subject: [Octave-bug-tracker] [bug #63353] Error in fscanf when maximum field width is specified and '%f' conversion used
Date: Tue, 15 Nov 2022 11:40:25 -0500 (EST)

Follow-up Comment #2, bug #63353 (project octave):

If I had to take a guess, I think Matlab divides the input stream based on the
field width and then applies the conversion to each chunk of input.  Octave,
however, seems to apply the conversion to the input and then move to whatever
remains of the input stream.

Matlab behavior:


v = sscanf ('1.234.567', '%3f')
v =
  1.2
  34.0
  567


Octave behavior:


v = sscanf ('1.234.567', '%3f')
v =
  1.234
  0.567




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63353>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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