<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18939"></HEAD>
<BODY bgColor=#ffffff text=#000000>
<DIV dir=ltr align=left><SPAN class=321300113-27082010><FONT color=#0000ff
size=2 face=Arial>thanks</FONT></SPAN></DIV>
<DIV>
<DIV align=left>
<P><FONT color=navy size=2 face=Arial><SPAN
style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt"></SPAN></FONT></P></DIV></DIV><BR>
<DIV dir=ltr lang=fr class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>De :</B> Antoine Monmayrant
[mailto:antoine.monmayrant@laas.fr] <BR><B>Envoyé :</B> vendredi 27 août
2010 14:58<BR><B>À :</B> users@lists.scilab.org<BR><B>Objet :</B> Re:
[scilab-Users] tutorial on ASCII file parsing commands?<BR></FONT><BR></DIV>
<DIV></DIV>Le 27/08/2010 14:53, Carrico, Paul a écrit :
<BLOCKQUOTE cite=mid:55A12CBC06A8C9459DCE0BBEF8122FDC0498ADEC@exchsrv.AUXITROL1
type="cite">
<META name=GENERATOR content="MSHTML 8.00.6001.18939">
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial>
<DIV><FONT size=2 face=Arial><SPAN class=791323912-27082010>another "trick" if
you want to create a loop to test several files :</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=791323912-27082010></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=791323912-27082010>step 1 : in the
repertory were the files are, type :</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=791323912-27082010>
"ls > files_names.dat"</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=791323912-27082010></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=791323912-27082010>step 2 : read the
files_names.dat with all the files ....</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=791323912-27082010></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=791323912-27082010></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=791323912-27082010></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=791323912-27082010>another way
?</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=791323912-27082010></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><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 lang=fr class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><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
href="mailto:paul.carrico@esterline.com"
moz-do-not-send="true">paul.carrico@esterline.com</A>></SPAN><BR>
<BLOCKQUOTE
style="BORDER-LEFT: rgb(204,204,204) 1px solid; 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 lang=fr align=left>
<HR>
<FONT size=2 face=Tahoma><B>De :</B> Pierre JUILLARD [mailto:<A
href="mailto:pierre.juillard@gmail.com" target=_blank
moz-do-not-send="true">pierre.juillard@gmail.com</A>]
<BR><B>Envoyé :</B> vendredi 27 août 2010 13:27<BR><B>À :</B> <A
href="mailto:users@lists.scilab.org" target=_blank
moz-do-not-send="true">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
href="http://wiki.scilab.org/Tutorials" target=_blank
moz-do-not-send="true">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>
<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.