[Scilab-users] Read matrix from text file

Stefan Du Rietz sdr at durietz.se
Mon Mar 20 18:44:18 CET 2017


Hello Frieder, have you tried just this?

Koeffizienten_Pfad = uigetfile(["*.txt"],'',"Wählen Sie die Datei 
Koeffizienten");

B = read(Koeffizienten_Pfad,-1,4)

Redards
Stefan


On 2017-03-20 17:26, Frieder Nikolaisen wrote:
> Hello,
>
> I do try to read a matrix of floating point numbers from a text file.
> I want to have floating point numbers in Sciliab. (I used before mgetl
> which return strings).
>
> I have attached the example text file and scilab file. The error it
> says is: read: Wrong number of output argument(s): 0 expected.
>
> Thank you.
>
> Greetings
>
> Frieder
>
>
>
> My code:
>
> Koeffizienten_Pfad = uigetfile(["*.txt"],'',"Wählen Sie die Datei Koeffizienten");
>
> Koeffizienten = mopen(Koeffizienten_Pfad)
>
> B = read(Koeffizienten,-1,4)
>
> disp(B)
>
> mclose('all')
>
>
>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>




More information about the users mailing list