[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #49660] textscan line ending skipped
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #49660] textscan line ending skipped |
Date: |
Mon, 21 Nov 2016 19:41:13 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 |
Follow-up Comment #2, bug #49660 (project octave):
According to the documentation for Octave and the '%s' field specifier:
'%s'
The word is parsed as a string ending at the last character
before whitespace, an end-of-line, or a delimiter specified in
the options.
The documentation for REPEAT is
The optional numeric argument REPEAT can be used for limiting the
number of items read:
-1
Read all of the string or file until the end (default).
N
Read until the first of two conditions occurs: 1) the format
has been processed N times, or 2) N lines of the input have
been processed.
Thus,
data = textscan(fid, '%s',1)
should only read a single word which it does.
Verifying this with Matlab would be useful.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49660>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/