[Scilab-users] TR : read_csv issue

Stéphane Bécu stephane.becu at maya-technologies.com
Mon Nov 12 11:25:12 CET 2012


 

 
Hello,
 
Using the official 5.4.0 scilab version, I have much difficulty to adapt the new csvRead function which replaces read_csv(). I've always used it easily to read alpha-numeric files but now it's not possible anymore.
 
Here is an example:
 
example of file to be treated:
 
//////////////////////////////////////////////////////////////////////////////////////////////
The first lines of this alpha-numerical file
are only comments. The last line of the file is also comment.
The following lines contain data to be sorted.
1; 5; 2.369
1; 5; 2.369 
1; 5; 2.369 
1; 5; 2.369 
1; 5; 2.369 
1; 5; 2.369 
1; 5; 2.369 
1; 5; 2.369 
1; 5; 2.369
This is the last line of the file.
/////////////////////////////////////////////////////////////////////////////////////////////////
 
Typing,
 
data=read_csv('myfile',";")
data(1:3,:) = [];                             // removes the 3 first comment lines
data($,:) = [];                                // removes thelast line of the file                           
data     = abs(evstr(data));
 
 
I used to finding the following result: 
ans =
1    5   2.369 
1    5   2.369 
1    5   2.369 
1    5   2.369 
1    5   2.369 
1    5   2.369 
1    5   2.369 
1    5   2.369 
1    5   2.369
 
 
But now it is not the case anymore?
 
Which functions could replace this in scilab 5.4.0?
 
Thanks in advance
 
Stéphane
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20121112/03e9b1d2/attachment.htm>


More information about the users mailing list