|
From: | Dr. Johannes Zellner |
Subject: | Re: textscan wanted |
Date: | Wed, 20 Oct 2010 07:39:31 +0200 |
I've opened a ticket in the bug tracker.On Oct 20, 2010, at 4:53 AM, Dr. Johannes Zellner wrote:
> Hi,
>
> I've a bunch of matlab files which use textscan.
>
> I don't want to replace all textscan calls with something like fscanf but I'd rather like to have an octave function which implements textscan().
>
> Does anyone have a textscan implementation?
>
> regards,
>
> --
> Johannes.
https://savannah.gnu.org/bugs/index.php?31380
For now, have you looked at using textread() instead? Unfortunately, textread() is not fully compatible with the ML version.
The syntax for ML's textscan is ...
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 (...)
If you don't require the input "N", it should be straight forward to modify scantext() to implement textscan(). A quick fix would support the limited syntax below.
C = textscan (fid, 'format')
C = textscan (fid, 'format', 'param', value)
C = textscan (str, ...)
Would that be useful to you?
Ben
[Prev in Thread] | Current Thread | [Next in Thread] |