Dear all,<br><br>I would like to know if there is some kind of tutorial (either in pdf or in the scilab wiki) presenting the Scilab parsing commands so that it is possible to read, write, appened an ASCII file (preferably with some examples)?<br>
<br>I had a quick look on Scilab wiki.<br>I see that there are tutorials for optimizations.<br>Is there a similar one about file parsing?<br>(ok, these are far lessinteresting functions scientifically speaking)<br><br>Actually, the basic functions I am intersting in is:<br>
<br>
______________________________________________________<br>1- read from an input file, input data to be used in a loop (robustness study) so as to perform calculation in a loop.<br>A function to read a file of the type below, storing the result in a table and looping over the table content would be perfect<br>
<br>(example of file content: one line per iteration)<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>variable1Values,  variable2Values, variable3Values<br>myDataFile1.inp,    3.14              , string1<br>myDataFile2.inp,    3.12              , string2<br>
myDataFile3.inp,    3.18              , string3<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>______________________________________________________<br>2- read the result in an ASCII file recognizing some keywords.<br><br>(example of file content: one result per line at one iteration, file is generated at every iteration)<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>result of objective 1: 20<br>result of objective 2: 34,55555<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
______________________________________________________<br>3- at each iteration, appening a conslidated result file (ie a "knowledge base")<br><br>(example of file content: one iteration per line)<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>variable1Values,  variable2Values, variable3Values, resultOfObjective1, resultOfObjective2<br>
myDataFile1.inp,    3.14              , string1            , 20,                       34.5555<br>
myDataFile2.inp,    3.12              , string2            , 22.6,                    37.1<br>
myDataFile3.inp,    3.18              , string3            , 21.8,                    35.6<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
______________________________________________________<br><br>I thank you in advance for any help.<br>Bests,<br><br>Pierre<br><br>PS: just a small feedback on the Scilab wiki page:<br><a href="http://wiki.scilab.org/Tutorials">http://wiki.scilab.org/Tutorials</a><br>
There is redundant "language" document classification:<br>tables are separated by langauges (english, french, others...) and recalled in the 1st column: this may not be necessary for the 2 first tables.<br>Also, some french documents appear in the english table.<br>
Should I help cleaning it?<br><br>