[scilab-Users] read_csv
Samuel GOUGEON
Samuel.Gougeon at univ-lemans.fr
Fri Apr 29 17:47:16 CEST 2011
Hello,
On your sample, mgetl() fails in the same way, and fscanfMat() also fails for
other reasons.
Here is a running solution:
-----
t = read("myfile.csv",-1,1,"(a)");
M = [];
for L = strsplit(t,strindex(t,ascii(13)))'
L = strsubst(strsplit(L,strindex(L,",")),",","")';
L = strsubst(L,ascii(13),"");
M = [ M ; L ];
end
eval(M(16:$,:))
----
Samuel
----- Message d'origine -----
De : R Sippe
Date : 29/04/2011 11:39:
> Dear Sir/Madam,
> I am new to Scilab and I want to use Scilab to analyze data contained in csv
> files.
> When I use read_csv(myfile.csv) it only returns the first row of the data.
> Opening the file in notepad shows that each row of data is separated by a
> space instead of a return.
> However these csv files are outputs of a program and I don't want to change
> the format manually for each csv file.
> What is the best way to deal with this problem?
> Greets,
> Robin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110429/43c8e781/attachment.htm>
More information about the users
mailing list