[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #33876] textscan: resuming reading does not wo
From: |
Ben Abbott |
Subject: |
[Octave-bug-tracker] [bug #33876] textscan: resuming reading does not work |
Date: |
Wed, 03 Aug 2011 23:08:39 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30 |
Follow-up Comment #12, bug #33876 (project octave):
I took a quick look. I see a test failure for textscan
>> test textscan
***** test
str = "Km:10 = hhhBjjj miles16hourrn";
str = [str "Km:15 = hhhJjjj miles241hourrn"];
str = [str "Km:2 = hhhRjjj miles3hourrn"];
str = [str "Km:25 = hhhZrn"];
fmt = "Km:%d = hhh%1sjjj miles%dhour";
a = textscan (str, fmt, 'delimiter', ' ');
assert (a{1}', [10 15 2 25], 1e-5);
assert (a{2}', {'B' 'J' 'R' 'Z'});
assert (a{3}', [16 241 3 NaN], 1e-5);
!!!!! test failed
assert (a {3}',[16, 241, 3, NaN],1e-5) expected
16 241 3 NaN
but got
16 241 3 0
NaNs don't match
Matlab gives a different result
>> a
a =
[4x1 int32] {4x1 cell} [3x1 int32]
>> a{:}
ans =
10
15
2
25
ans =
'B'
'J'
'R'
'Z'
ans =
16
241
3
Is this expected?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?33876>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/