[Scilab-users] Put .txt data in matrix

simon_37 simmart37 at gmail.com
Thu Dec 12 11:58:39 CET 2013


Thanks you to everyone for their help.
It's finally done.

I drop my code :

[FileName,PathName] = uigetfile('','','sélectionnez le(s) fichier(s) à
traiter',%t);
f = fullfile(PathName, FileName)
f1 = mopen(f,"r");
garbage = mgetl(f1,15);
m = [];
while ~meof(f1) 
        line = mgetl(f1,1) // read one line
        if line == [] then
            break
        end
        lineNr = eval(tokens(line))' // dont forget the '
        m = [m;lineNr] // add one line to m   
end

x1=m(:,1)
y1=m(:,2)
x2=m(:,3)
y2=m(:,4)

plot(x1,y1)

Regards 
Simon



--
View this message in context: http://mailinglists.scilab.org/Put-txt-data-in-matrix-tp4028011p4028022.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.



More information about the users mailing list