[Top][All Lists]

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

[Octave-bug-tracker] [bug #42025] dlmread unable to recognize emptyvalue

From: Rik
Subject: [Octave-bug-tracker] [bug #42025] dlmread unable to recognize emptyvalues at start of line with whitespace separator
Date: Mon, 17 Oct 2016 22:24:06 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #7, bug #42025 (project octave):

We could get a check.  Philip apparently has access to 2014a.

The problem is that whitespace is supposed to be ignored at the start of
lines.  But what if the delimiter is whitespace itself?  There is some code to
partially work around this by setting an internal variable sepflag, but it is
all rather complicated.

In the imp3.txt file, one of the lines is

" 3 33"

When read with

dlmread ('imp3.txt', ' ')

I would think that the first space is treated as a delimiter which means the
output should be

0  3  33

Instead, Matlab eats the whitespace at the beginning of the line and returns

3  33

But the line above this in imp3.txt is

" 22"

In this case, Matlab doesn't eat the whitespace and actually returns

0  22

It is almost like you would need to parse any line beginning with a whitespace
delimiter twice in order to determine which way gave you the "best" outcome.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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