[Scilab-users] using csvRead
Rafael Guerra
jrafaelbguerra at hotmail.com
Sat Oct 15 18:58:11 CEST 2016
Hi Serge,
One question:
For some strange reason, the variable 'r' is in this case a mlist of type cblock and not a matrix of type constant.
To convert it to constant, it seems that we need a further instruction, such as: r=r( : , : );
Any comments on this?
Regards,
Rafael
From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Serge Steer
Sent: Friday, October 14, 2016 8:52 PM
To: Users mailing list for Scilab <users at lists.scilab.org>
Subject: Re: [Scilab-users] using csvRead
you can use the mfscanf function:
u=mopen("myfile","r");
h=mfscanf(1,u,"%s\n");
r=mfscanf(-1,u,"%d.%d.%d, %d:%d:%f, %f, %f\n");
mclose(u)
Serge Steer
Le 14/10/2016 à 00:08, Philipp Mühlmann a écrit :
Dear Scilab users,
having a data file (*.cvs) containg following format:
HEADER-Line
dd.mm.yyyy, HH:MM:SS.MS<http://SS.MS>, value01, value02
dd = day
mm = month
yyyy = year
HH = hour
MM = minute
SS = second
Ms = milli second
ValueXY = numerical value
Is it possible to use cvsRead in such a way to define the separator beeing ',' and ':' at the same time?
Background:
desired Matrix after reading the file is
M = [dd mm yyyy HH MM SS MS value1 value2]
Thank you,
Philipp
--
In Kanada is' ka' na' da. Sonst wär' Kanada Jemanda.
There we have the salad.
_______________________________________________
users mailing list
users at lists.scilab.org<mailto:users at lists.scilab.org>
http://lists.scilab.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20161015/53710b34/attachment.htm>
More information about the users
mailing list