The main problem I ran into with csvRead was reading files with a variable number of separators in each row. Then my suggested solution pads with 0. It could be changed to pad with NaN also.

Using strsplit in each row allows for several separators in the same conversion.  It may still be useful to use evstr row by row instead, if the number of spaces between numbers vary.

J


On 2020-09-10 10:46 AM, P M wrote:
I think csvRead is just fine.

[data  header]  =  csvRead(fname,  '',  '.',  'string',  [],  [],  [],  0);
As you may notice the data Matrix contains a lot of empty columns.
This is due to the many white spaces in the text file
anyways, after reading the dta in you may use evstr() to convert into doubles.
BR
Philipp

Am Do., 10. Sept. 2020 um 04:03 Uhr schrieb <[email protected] <mailto:[email protected]>>:

    Hello Daniel,

    Do you have try with "evstr" function ?

    data = evstr(mgetl("output.txt"));

    Regards,
    Antoine

    _______________________________________________
    users mailing list
    [email protected] <mailto:[email protected]>
    http://lists.scilab.org/mailman/listinfo/users


_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to