[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
newline in strread format
From: |
John W. Eaton |
Subject: |
newline in strread format |
Date: |
Mon, 23 Jun 2014 23:57:50 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0 |
I think the following should work, but it's throwing an error:
octave:1> [a, b, c] = strread ("1 2 3\n4 5 6\n7 8 9\n", "%f %f %f\n")
strread: FORMAT does not match data
error: called from 'strread' in file
/home/jwe/src/octave-stable/scripts/io/strread.m near line 745, column 13
error: called from:
error: /home/jwe/src/octave-stable/scripts/io/strread.m at line
755, column 9
I took a look at strread.m but I'm not sure what the right approach is
for a fix. It appears to me that newlines are removed from the string
and that it is split on the field delimiter. But the newline
character remains in the list of format specifiers.
I noticed the problem in the stable sources, but it seems to also be
present in the current sources on the default branch.
Any clues would be much appreciated.
Thanks,
jwe
- newline in strread format,
John W. Eaton <=