Tue 01 Apr 2014 08:44:32 PM UTC, original submission:
(Not sure if I fully understand dlmread's behavior but here goes:)
File imp2a.txt:
aaaa 11
bbbb
cccc 33
(note trailing space on L.2 after bbbb)
Note the only difference is an empty delimiter in the second call.
dlmread's behavior for this case of an empty delimiter isn't described in dlmread's help. I suppose it's meant, like in Matlab, to treat multiple consecutive spaces as one delimiter.
Now consider file imp2b.txt:
aaaa 11
bbbb
cccc 33
(same as imp2a.txt but now w/o trailing space on L.2)
Here, both dlmread calls (with empty and with space delimiter) yield results I didn't expect (hope for).
As to ML: that doesn't have the 'emptyvalue' parameter; calling dlmread (w/o 'emptyvalue' parameter) in ML gets me
11
0
33
for all four cases above.
Background: I'm trying to get importdata.m more ML-compatible. To that end, dlmread should return proper NA values when called with '"emptyvalue", NA' and an empty delimiter.
The importdata.m incompatibility is this:
Octave:
where ML r2014a gives:
|