Hello,

Perhaps this could help (there is probably a more direct way to do it)

str1="00:01:00;5.49;1";
str2=strchr(str1,';');   //str2= ";5.49;1"
str3=strtok(str2,';'); // str3 = "5.49"
d =  strtod(str3);

Regards

Guylaine

-----Message d'origine-----
De : users [mailto:[email protected]] De la part de grivet
Envoyé : lundi 12 octobre 2015 14:27
À : [email protected]
Objet : [Scilab-users] read format

Hello,
I have a data file of about 80k lines. A typical line looks like this:
         01/03/2015 00:01:00;5.49;1
(date time; value;parameter). I am only interested in the field "value",
which can be 3 or 4 characters wide (i.e. 5.49 or 5.4).
How can I extract the desired data from this file ?
Thank you for your help.
JP Grivet
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to