[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #41630] Importdata function fails with Unable
[Octave-bug-tracker] [bug #41630] Importdata function fails with Unable to determine delimiter error
Wed, 26 Mar 2014 13:40:40 +0000
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0
Update of bug #41630 (project octave):
Item Group: Incorrect Result => Matlab Compatibility
Status: None => In Progress
Assigned to: None => philipnienhuis
Operating System: Mac OS => Any
Follow-up Comment #2:
Confirmed, I hit a similar issue at work today.
BTW, the contents of the text file you attached differ from your bug report.
But I don't think that matters.
Trying your example in Matlab neatly gives the output I suppose you expected
(note I copied the file contents from your report, not your file):
>> importdata ('lm.txt')
Right, looks good. Now trying with two columns of text and a delimiter:
>> importdata ('lm2.txt', ' ')
and moreover with a file containing:
>> aa = importdata ('nums1.txt')
...so I conclude that if Matlab's importdata() can't distill any numeric data
from the file, it simply assumes it consists of all text and it'll return the
lines it originally interpreted to be headerlines as file contents.
Little wonder as I think importdata.m is primarily meant to return numeric
data, rather than text strings. You'd need to carefully read between the lines
in the ML docs, but it's there.
You can see that if ML doesn't detect any numeric data, it simply ignores the
explicitly specified delimiters in the file and returns a 1-column cellstr
I'll prepare a changeset later on (hopefully this week).
Another changeset is required for newly supported spreadsheet formats (a.o.,
gnumeric), some of which are now supported w/o external dependencies.
In the ML docs there's mention of another importdata output format, having
headers above the data columns. I don't need it now, but if it's not too
involved I'll have a go at that one as well.
OS set to "any" (I hit this on Windows);
Item Group => ML compatibility (as I think Octave isn't in error per se; it's
just IMO inconsistent ML behavior we'd need to mimic)
Reply to this item at:
Message sent via/by Savannah
|[Prev in Thread]
||[Next in Thread]|
- [Octave-bug-tracker] [bug #41630] Importdata function fails with Unable to determine delimiter error,
Philip Nienhuis <=