[scilab-Users] tutorial on ASCII file parsing commands?

Pierre JUILLARD pierre.juillard at gmail.com
Fri Aug 27 14:35:53 CEST 2010


Pau, thank you!

Bests,

Pierre




2010/8/27 Carrico, Paul <paul.carrico at esterline.com>

>   Hi,
>
>
>
> I don't know if it's the best way ... however it works in my case ...
>
> hope this help
>
> Paul
>
>  ------------------------------
> *De :* Pierre JUILLARD [mailto:pierre.juillard at gmail.com]
> *Envoyé :* vendredi 27 août 2010 13:27
> *À :* users at lists.scilab.org
> *Objet :* [scilab-Users] tutorial on ASCII file parsing commands?
>
> Dear all,
>
> 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)?
>
> I had a quick look on Scilab wiki.
> I see that there are tutorials for optimizations.
> Is there a similar one about file parsing?
> (ok, these are far lessinteresting functions scientifically speaking)
>
> Actually, the basic functions I am intersting in is:
>
> ______________________________________________________
> 1- read from an input file, input data to be used in a loop (robustness
> study) so as to perform calculation in a loop.
> 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
>
> (example of file content: one line per iteration)
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> variable1Values,  variable2Values, variable3Values
> myDataFile1.inp,    3.14              , string1
> myDataFile2.inp,    3.12              , string2
> myDataFile3.inp,    3.18              , string3
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ______________________________________________________
> 2- read the result in an ASCII file recognizing some keywords.
>
> (example of file content: one result per line at one iteration, file is
> generated at every iteration)
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> result of objective 1: 20
> result of objective 2: 34,55555
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ______________________________________________________
> 3- at each iteration, appening a conslidated result file (ie a "knowledge
> base")
>
> (example of file content: one iteration per line)
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> variable1Values,  variable2Values, variable3Values, resultOfObjective1,
> resultOfObjective2
> myDataFile1.inp,    3.14              , string1            ,
> 20,                       34.5555
> myDataFile2.inp,    3.12              , string2            ,
> 22.6,                    37.1
> myDataFile3.inp,    3.18              , string3            ,
> 21.8,                    35.6
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ______________________________________________________
>
> I thank you in advance for any help.
> Bests,
>
> Pierre
>
> PS: just a small feedback on the Scilab wiki page:
> http://wiki.scilab.org/Tutorials
> There is redundant "language" document classification:
> tables are separated by langauges (english, french, others...) and recalled
> in the 1st column: this may not be necessary for the 2 first tables.
> Also, some french documents appear in the english table.
> Should I help cleaning it?
>
> --------------------------------------------------------------------------------
>
>
> Le présent mail et ses pièces jointes sont confidentiels et destinés à la personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de votre système. Toute divulgation, copie ou distribution de cet e-mail est strictement interdite.
>
> This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please contact the sender and delete the email from your system. If you are not the named addressee you should not disseminate, distribute or copy this email.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20100827/6a0135a4/attachment.htm>


More information about the users mailing list