Sun 24 Jul 2011 11:07:06 PM UTC, comment #7:
With today's latest code fixes on my box (but perhaps it worked before them as well):
octave.exe:94> isequal (strread ('1 2 3 4', '%d', 2), [1; 2])
ans = 1
octave.exe:95>
Hopefully tomorrow I can prepare patches and have a look at the example data2.csv file.
|
Sun 24 Jul 2011 10:51:21 PM UTC, comment #6:
To be honest, I didn't check on how texread/scan function.
However, for strreadO on Matlab ...
|
Sun 24 Jul 2011 09:20:27 PM UTC, comment #5:
I think this is actually working. The documentation for textscan (http://www.mathworks.com/help/techdoc/ref/textscan.html) says that it does not use varargout the way your test is written. If I rewrite your test to use textread, which does behave the way you expect, than it works.
In any case, I just checked in more changes to these functions so you should do an update from Mercurial to changeset 12877:ddea3962b024 before further testing.
|
Sat 23 Jul 2011 11:29:11 AM UTC, comment #2:
I don't know if it is a regression, but the multiple output format no longer works.
[A, B, C, ...] = textread (filename, format)
Using the attached "data2.csv", the following doesn't work.
(file #23685)
|
Fri 22 Jul 2011 08:58:46 PM UTC, comment #1:
Can you re-verify your issue with a changeset greater than or equal to 12868:b00181c65533? Although the documentation has not been updated, strread now supports format specifier repeats and so the calling convention textread (filename, format, N) should work.
|
Wed 20 Oct 2010 04:10:10 AM UTC, original submission:
Matlab's version allows the format specification to be reused a specified number of times, N.
[A, B, C, ...] = textread (filename, format)
[A, B, C, ...] = textread (filename, format, N)
[...] = textread (..., param, value, ...)
If this functionality is added then it should be straight forward to modify textread() to implement the missing function textscan(). Perhaps it would be proper to rewrite textread() to call textscan().
textscan behaves as ...
C = textscan (fid, 'format')
C = textscan (fid, 'format', N)
C = textscan (fid, 'format', 'param', value)
C = textscan (fid, 'format', N, 'param', value)
C = textscan (str, ...)
[C, position] = textscan (...)
... where C is a cell array ... a concatenation of the outputs for textread().
|