Re: [Scilab-users] using csvRead

2016-10-21 Thread jean-philippe grivet
Both vi and emacs can handle vary large files. You could use either to replace all separatots by commas and then use csvRead. Le 15/10/2016 15:45, Samuel Gougeon a écrit : Hello Le 14/10/2016 00:08, Philipp Mühlmann a écrit : Dear Scilab users, having a data file (*.cvs) containg following f

Re: [Scilab-users] using csvRead vs mfscanf and fscanfMat

2016-10-17 Thread Lester Anderson
ry file to disk and so it will run much > faster on PC's with SSD drives. > > Regards, > Rafael > > -Original Message- > From: users [mailto:users-boun...@lists.scilab.org] On Behalf Of Lester > Anderson > Sent: Monday, October 17, 2016 10:26 AM > To: Users maili

Re: [Scilab-users] using csvRead vs mfscanf and fscanfMat

2016-10-17 Thread Rafael Guerra
g] On Behalf Of Lester Anderson Sent: Monday, October 17, 2016 10:26 AM To: Users mailing list for Scilab Subject: Re: [Scilab-users] using csvRead vs mfscanf and fscanfMat Hello, I ran the same code on my machine and actually got worse results: -->exec('Q:\Scilab_code\csvread_write.sce

Re: [Scilab-users] using csvRead vs mfscanf and fscanfMat

2016-10-17 Thread Lester Anderson
Hello, I ran the same code on my machine and actually got worse results: -->exec('Q:\Scilab_code\csvread_write.sce', -1) 1.12.2015.1.15.0.12.1.1 - 2.2 1.12.2015.1.15.0.12.1.1 - 2.2 !01.12.2015 1 15 0.12 1.1 -2.2 ! time1= 1

Re: [Scilab-users] using csvRead

2016-10-16 Thread Philipp Mühlmann
Dear Samuel, Rafael, thanks for taking my initial question further to a higher level. I wouldn't have expected to create a bug out of it. So, for me: I am fine with either creating a temporary file and using fscanfMat or mfscanf(). In fact: fscanfMat() is closer to my level of code understan

Re: [Scilab-users] using csvRead

2016-10-15 Thread Samuel Gougeon
Le 15/10/2016 21:16, Samuel Gougeon a écrit : Hello Philipp, 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., HH:MM:SS.MS , value01, value02 dd = day mm = month = year HH = ho

Re: [Scilab-users] using csvRead vs mfscanf and fscanfMat

2016-10-15 Thread Samuel Gougeon
Hello Rafael, Le 15/10/2016 20:49, Rafael Guerra a écrit : .../... The results for a 50,000-lines input ASCII file are: time1= 0.686404 // mfscanf time2= 0.499203 // fscanfMat time3= 35.3966// csvRead . Thanks for these very convincing results. I thought that evstr() is vec

Re: [Scilab-users] using csvRead

2016-10-15 Thread Samuel Gougeon
Hello Philipp, 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., HH:MM:SS.MS , value01, value02 dd = day mm = month = year HH = hour MM = minute SS = second Ms = milli second V

Re: [Scilab-users] using csvRead vs mfscanf and fscanfMat

2016-10-15 Thread Rafael Guerra
q2 = evstr(tx2); // Most time consuming step // (plus, work will still be required to handle dates in txt1) t3 = timer(); disp( [tx1(1,:) string(q2(1,:))], r(1,:), m(1,:) ) printf("\ntime1= %g\ntime2= %g\ntime3= %g",t1,t2,t3) //END OF CODE The results for a 50,000-lines input ASCII fil

Re: [Scilab-users] using csvRead

2016-10-15 Thread Samuel Gougeon
Le 15/10/2016 19:32, Rafael Guerra a écrit : Thanks Samuel, but I could not see where does it say how can we convert a mlist of ctype to a regular matrix, so that we can use all usual matrix operations. Could you please advise. You are right, the *cblock* type is nowhere documented. Simple

Re: [Scilab-users] using csvRead

2016-10-15 Thread Samuel Gougeon
Le 15/10/2016 19:16, Rafael Guerra a écrit : Hi Samuel, As the data is loaded by csvRead as strings in the example below (if loading as doubles then we get NaN’s), it will require further processing to convert it to numeric (using evstr, tokens or other). For very large data files, this see

Re: [Scilab-users] using csvRead

2016-10-15 Thread Rafael Guerra
-boun...@lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Saturday, October 15, 2016 7:26 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] using csvRead Le 15/10/2016 18:58, Rafael Guerra a écrit : Hi Serge, One question: For some strange reason, the variable 'r' is in

Re: [Scilab-users] using csvRead

2016-10-15 Thread Samuel Gougeon
Le 15/10/2016 18:58, Rafael Guerra a écrit : 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 comme

Re: [Scilab-users] using csvRead

2016-10-15 Thread Rafael Guerra
f or fscanfMat solutions. What do you think? Regards, Rafael From: users [mailto:users-boun...@lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Saturday, October 15, 2016 5:55 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] using csvRead Le 15/10/2016 15:45, Samuel Goug

Re: [Scilab-users] using csvRead

2016-10-15 Thread Rafael Guerra
rom: users [mailto:users-boun...@lists.scilab.org] On Behalf Of Serge Steer Sent: Friday, October 14, 2016 8:52 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] using csvRead you can use the mfscanf function: u=mopen("myfile","r"); h=mfscanf(1,u,"%s\n"); r=

Re: [Scilab-users] using csvRead

2016-10-15 Thread Samuel Gougeon
Le 15/10/2016 15:45, Samuel Gougeon a écrit : Hello 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., HH:MM:SS.MS , value01, value02 dd = day mm = month = year HH = hour MM = m

Re: [Scilab-users] using csvRead

2016-10-15 Thread Samuel Gougeon
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., HH:MM:SS.MS , value01, value02 .../... Is it possible to use cvsRead in such a way to define the separator beeing ',' and ':' at the s

Re: [Scilab-users] using csvRead

2016-10-15 Thread Samuel Gougeon
Hello 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., HH:MM:SS.MS , value01, value02 dd = day mm = month = year HH = hour MM = minute SS = second Ms = milli second ValueXY =

Re: [Scilab-users] using csvRead

2016-10-15 Thread Rafael Guerra
Users mailing list for Scilab 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

Re: [Scilab-users] using csvRead

2016-10-14 Thread Serge Steer
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.

Re: [Scilab-users] using csvRead

2016-10-14 Thread Philipp Mühlmann
Guerra > *Sent:* Friday, October 14, 2016 12:58 PM > > *To:* Users mailing list for Scilab > *Subject:* Re: [Scilab-users] using csvRead > > > > *Correction:* after having obtained ‘tx’ as below, just do:M=evstr(tx > ); > > > > *From:* users [mai

Re: [Scilab-users] using csvRead

2016-10-14 Thread Rafael Guerra
: Users mailing list for Scilab Subject: Re: [Scilab-users] using csvRead Correction: after having obtained ‘tx’ as below, just do:M=evstr(tx); From: users [mailto:users-boun...@lists.scilab.org] On Behalf Of Rafael Guerra Sent: Friday, October 14, 2016 12:53 PM To: Users mailing list for

Re: [Scilab-users] using csvRead

2016-10-14 Thread Rafael Guerra
Correction: after having obtained ‘tx’ as below, just do:M=evstr(tx); From: users [mailto:users-boun...@lists.scilab.org] On Behalf Of Rafael Guerra Sent: Friday, October 14, 2016 12:53 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] using csvRead Hello Philipp, Say that

Re: [Scilab-users] using csvRead

2016-10-14 Thread Rafael Guerra
‘M’. Regards, Rafael From: users [mailto:users-boun...@lists.scilab.org] On Behalf Of Philipp Mühlmann Sent: Friday, October 14, 2016 11:50 AM To: Users mailing list for Scilab Subject: Re: [Scilab-users] using csvRead Dear Denis, yes thats the way I do it right now. use mopen --> op

Re: [Scilab-users] using csvRead

2016-10-14 Thread Philipp Mühlmann
m/ump-cnrs-thales > > http://www.research.thalesgroup.com > > > > *De :* users [mailto:users-boun...@lists.scilab.org] *De la part de* > Philipp Mühlmann > *Envoyé :* vendredi 14 octobre 2016 00:08 > *À :* International users mailing list for Scilab. > *Objet :* [Scilab-

Re: [Scilab-users] using csvRead

2016-10-13 Thread CRETE Denis
0denis.cr...@thalesgroup.com> http://www.trt.thalesgroup.com/ump-cnrs-thales http://www.research.thalesgroup.com De : users [mailto:users-boun...@lists.scilab.org] De la part de Philipp Mühlmann Envoyé : vendredi 14 octobre 2016 00:08 À : International users mailing list for Scilab. Objet : [Scilab-users] u

[Scilab-users] using csvRead

2016-10-13 Thread Philipp Mühlmann
Dear Scilab users, having a data file (*.cvs) containg following format: HEADER-Line dd.mm., HH:MM:SS.MS, value01, value02 dd = day mm = month = 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 t