<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Le 27/08/2010 14:53, Carrico, Paul a écrit :
<blockquote
 cite="mid:55A12CBC06A8C9459DCE0BBEF8122FDC0498ADEC@exchsrv.AUXITROL1"
 type="cite">
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
  <meta name="GENERATOR" content="MSHTML 8.00.6001.18939">
  <div dir="ltr" align="left"><font face="Arial" color="#0000ff"
 size="2">
  <div><font face="Arial" size="2"><span class="791323912-27082010">another
"trick" if you want to create a loop to test several files :</span></font></div>
  <div><font face="Arial" size="2"><span class="791323912-27082010"></span></font> </div>
  <div><font face="Arial" size="2"><span class="791323912-27082010">step
1 : in the repertory were the files are, type :</span></font></div>
  <div><font face="Arial" size="2"><span class="791323912-27082010">          
"ls > files_names.dat"</span></font></div>
  <div><font face="Arial" size="2"><span class="791323912-27082010"></span></font> </div>
  <div><font face="Arial" size="2"><span class="791323912-27082010">step
2 : read the files_names.dat with all the files ....</span></font></div>
  <div><font face="Arial" size="2"><span class="791323912-27082010"></span></font> </div>
  <div><font face="Arial" size="2"><span class="791323912-27082010"></span></font> </div>
  <div><font face="Arial" size="2"><span class="791323912-27082010"></span></font> </div>
  <div><font face="Arial" size="2"><span class="791323912-27082010">another
way ?</span></font></div>
  <div><font face="Arial" size="2"><span class="791323912-27082010"></span></font> </div>
  <div><font face="Arial" size="2"><span class="791323912-27082010">Paul</span></font></div>
  </font></div>
</blockquote>
<br>
Yes, you can use listfiles (
<a class="moz-txt-link-freetext" href="http://www.scilab.org/product/man/listfiles.html">http://www.scilab.org/product/man/listfiles.html</a> )<br>
It returns a string matrix so you can loop over each element of the
matrix (each element corresponds to one file name).<br>
<br>
Antoine<br>
<blockquote
 cite="mid:55A12CBC06A8C9459DCE0BBEF8122FDC0498ADEC@exchsrv.AUXITROL1"
 type="cite">
  <div> </div>
  <br>
  <div dir="ltr" class="OutlookMessageHeader" align="left" lang="fr">
  <hr tabindex="-1"><font face="Tahoma" size="2"><b>De :</b> Pierre
JUILLARD [<a class="moz-txt-link-freetext" href="mailto:pierre.juillard@gmail.com">mailto:pierre.juillard@gmail.com</a>] <br>
  <b>Envoyé :</b> vendredi 27 août 2010 14:36<br>
  <b>À :</b> <a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
  <b>Objet :</b> Re: [scilab-Users] tutorial on ASCII file parsing
commands?<br>
  </font><br>
  </div>
Pau, thank you!<br>
  <br>
Bests,<br>
  <br>
Pierre<br>
  <br>
  <br>
  <br>
  <br>
  <div class="gmail_quote">2010/8/27 Carrico, Paul <span dir="ltr"><<a
 moz-do-not-send="true" href="mailto:paul.carrico@esterline.com">paul.carrico@esterline.com</a>></span><br>
  <blockquote
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"
 class="gmail_quote">
    <div>
    <div dir="ltr" align="left">
    <div align="left">
    <p><span style="font-family: Arial; color: navy; font-size: 10pt;"><span>Hi,</span></span></p>
    <p><span style="font-family: Arial; color: navy; font-size: 10pt;"><span></span></span> </p>
    <p><span style="font-family: Arial; color: navy; font-size: 10pt;"><span>I
don't know if it's the best way ... however it works in my case ...</span></span></p>
    <p><span style="font-family: Arial; color: navy; font-size: 10pt;"><span>hope
this help</span></span></p>
    <p><span style="font-family: Arial; color: navy; font-size: 10pt;"><span>Paul</span></span></p>
    </div>
    </div>
    <br>
    <div dir="ltr" align="left" lang="fr">
    <hr> <font face="Tahoma" size="2"><b>De :</b> Pierre JUILLARD
[mailto:<a moz-do-not-send="true"
 href="mailto:pierre.juillard@gmail.com" target="_blank">pierre.juillard@gmail.com</a>]
    <br>
    <b>Envoyé :</b> vendredi 27 août 2010 13:27<br>
    <b>À :</b> <a moz-do-not-send="true"
 href="mailto:users@lists.scilab.org" target="_blank">users@lists.scilab.org</a><br>
    <b>Objet :</b> [scilab-Users] tutorial on ASCII file parsing
commands?<br>
    </font><br>
    </div>
    <div>
    <div class="h5"> 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 moz-do-not-send="true" href="http://wiki.scilab.org/Tutorials"
 target="_blank">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>
    </div>
    </div>
    </div>
    <pre>--------------------------------------------------------------------------------


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.

    </pre>
  </blockquote>
  </div>
  <br>
  <pre>--------------------------------------------------------------------------------


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.

  </pre>
</blockquote>
<br>
<br>
</body>
</html>