500mo Ascii file

Tingsten remi.mercier at imelavi.fr
Sat Jun 9 13:06:43 CEST 2012


Hello everyone,

I have got a 500mo ascii file that I would like to post process with Scilab(
5.3.3 or 5.4) and I am struggling a lot….
My file looks like that:

*Header
Test number 1, 05/06/2012
6 Channels at 50000Hz
Data starts here:
Time,CH1,CH2,CH3,CH4,CH5,CH6
-10.000019,-0.660920,-0.136021,-0.120244,1.206482,-0.201057,-0.040760,
-9.999999,-0.605067,-0.136021,-0.124390,1.151813,-0.126591,0.002605,
-9.999979,-0.584123,-0.140555,-0.128536,1.025510,-0.040956,0.027115,
………*

Cause of the header I can’t use straight csv_read (or I need to delete the
header first with a text editor and then use it. That works but is not very
“clean”) so I would like to do it only with scilab.

What I do (and that does not work…):

First I check where start the data and analyse the format:
/f=mopen(file,’r’);data=mgetl(f,10);mclose(f); =>works fine/

Then I increase the stacksize and read the entire file :
/stacksize(‘max’);f=mopen(file,’r’);data=mgetl(f,-1);mclose(f);/ =>works
fine

Then I try to extract some of the data:
/[n,Time,CHX]=msscanf(-1,data(6:$),”%f,%f”)/ => crashes everytime (with
5.3.3 or 5.4)
But a 
/[n,Time,CHX]=msscanf(-1,data(6:1000:$),”%f,%f”)/ => works fine (with 5.3.3
or 5.4)

Do you have some advice to open the whole file properly in scilab?
Thx you a lot for your help and have a great week-end.


--
View this message in context: http://mailinglists.scilab.org/500mo-Ascii-file-tp4024324.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.



More information about the users mailing list