Parsing ascii delimited data
Louis
louis at awake24.de
Tue Nov 3 21:35:38 CET 2009
Hi everyone.
I try to parse a ascii delimited file.
If I try to use fscanf I get this:
-->a=fscanf(‘data.csv', '%s;%s');
!--error 999
msprintf: Wrong number of input arguments: data doesn't fit with format.
at line 51 of function sscanf called by :
[v1] = sscanf(buf,frmt);
in execstr instruction called by :
line 41 of function fscanf called by :
a=fscanf('kapitalkurven_quelle.csv', '%s;%s');
If I try to use mfscanf like this:
[n,a,b]=mfscanf(-1, u, '%s;%s');
It does not split the input line at ;.
So if I type a I get this:
!31.01.2003;115.918,60 !
! !
!€ !! !
!aaaaa;1.1,10 !
! !
!€ !! !
!bbbbbbb;1.2,50 !
! !
!€ !! !
!cccccc;1.22,00 !
! !
!€ !! !
!dddddd;1.3,20 !
Can someone help me so I will get something like this:
!aaaaaaa ! 1.1,10 !
Thanks Louis.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20091103/9baaa91a/attachment.htm>
More information about the users
mailing list