<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1649" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV><SPAN class=312453610-24092010><FONT face=Arial color=#0000ff size=2>You 
need to put all of the line into the string before execstr, 
like:</FONT></SPAN></DIV>
<DIV><SPAN class=312453610-24092010><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=312453610-24092010><FONT face=Arial color=#0000ff 
size=2>-->for i = 1 : 10<BR>-->    newstr = "A = A + 
matrix" + string(i);<BR>-->    
execstr(newstr);<BR>-->end<BR></FONT></SPAN></DIV>
<DIV><SPAN class=312453610-24092010><FONT face=Arial color=#0000ff 
size=2>-->A<BR> A  =</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=312453610-24092010><FONT face=Arial color=#0000ff 
size=2>    10.    20.    
30.    40.<BR></FONT></SPAN></DIV>
<DIV><SPAN class=312453610-24092010><FONT face=Arial color=#0000ff size=2>(You 
also have mistyped newstr as mewstr :-)</FONT></SPAN></DIV>
<DIV><SPAN class=312453610-24092010><FONT face=Arial color=#0000ff 
size=2> </DIV></FONT></SPAN>
<DIV><SPAN class=312453610-24092010><FONT face=Arial color=#0000ff 
size=2>HTH</FONT></SPAN></DIV>
<DIV><SPAN class=312453610-24092010><FONT face=Arial color=#0000ff 
size=2>Mike.</FONT></SPAN></DIV>
<DIV><SPAN class=312453610-24092010><FONT face=Arial color=#0000ff 
size=2> </DIV></FONT></SPAN>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> Carrico, Paul 
  [mailto:paul.carrico@esterline.com]<BR><B>Sent:</B> 24 September 2010 
  11:04<BR><B>To:</B> users@lists.scilab.org<BR><B>Subject:</B> RE: 
  [scilab-Users] How to automatically increase matrix name 
  number<BR><BR></FONT></DIV>
  <DIV dir=ltr align=left>
  <DIV align=left>
  <P><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN 
  class=873110110-24092010>I think I do not understand something ... can 
  somebody tell me what I'm doing wrong ?</SPAN></SPAN></P>
  <P><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN 
  class=873110110-24092010>Thanks in advance</SPAN></SPAN></P>
  <P><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN 
  class=873110110-24092010>Paul</SPAN></SPAN></P>
  <P><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN 
  class=873110110-24092010></SPAN></SPAN> </P>
  <P><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN 
  class=873110110-24092010>######################################################################################</SPAN></SPAN></P>
  <P><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN 
  class=873110110-24092010>mode(0)<BR>clear all</SPAN></SPAN></P>
  <P><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN 
  class=873110110-24092010>// creation of the matrix<BR>for j = 1 : 
  10<BR>    mystr2="matrix"+string(j)+"=[1 2, 3 
  4]";<BR>    execstr(mystr2)<BR>end</SPAN></SPAN></P><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN 
  class=873110110-24092010>
  <P><BR>// verification that matrix1, matrix2 and so on are 
  variables/declared<BR>printf("\n the matrix are manually print on the 
  sreen\n")<BR>matrix1<BR>matrix2<BR>matrix3</P>
  <P>// print <SPAN class=873110110-24092010>of </SPAN>all the matrix<SPAN 
  class=873110110-24092010> throughout a loop</SPAN><BR>printf("\n print of the 
  matrix on the sreen using a loop\n")<BR>for i = 1 : 10<BR>    
  execstr("disp(matrix" + string(i)+")");<BR>end</P>
  <P><BR>// test to validate that calculation<SPAN 
  class=873110110-24092010>s</SPAN> can be performed why the previous 
  matrix<BR>A = []<BR>for i = 1 : 10<BR>    mewstr = "matrix" + 
  string(i);<BR>    A = A + execstr(newstr);<BR>end</P>
  <P>A</SPAN></SPAN></P></DIV></DIV><BR>
  <DIV class=OutlookMessageHeader lang=fr dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>De :</B> Antoine Monmayrant 
  [mailto:antoine.monmayrant@laas.fr] <BR><B>Envoyé :</B> vendredi 24 
  septembre 2010 10:24<BR><B>À :</B> 
  users@lists.scilab.org<BR><B>Objet :</B> Re: [scilab-Users] How to 
  automatically increase matrix name number<BR></FONT><BR></DIV>
  <DIV></DIV>Le 24/09/2010 10:05, Carrico, Paul a écrit : 
  <BLOCKQUOTE 
  cite=mid:55A12CBC06A8C9459DCE0BBEF8122FDC0498AE81@exchsrv.AUXITROL1 
  type="cite">
    <META content="MSHTML 8.00.6001.18939" name=GENERATOR>
    <DIV><SPAN class=598405907-24092010><FONT face=Arial 
    size=2>All,</FONT></SPAN></DIV>
    <DIV><SPAN class=598405907-24092010></SPAN> </DIV>
    <DIV><SPAN class=598405907-24092010><FONT face=Arial size=2>In a loop I 
    would like to create several matrix but their size as well as their 
    number/name number depend on the file results (they're automatically 
    created).</FONT></SPAN></DIV>
    <DIV><SPAN class=598405907-24092010></SPAN> </DIV>
    <DIV><SPAN class=598405907-24092010><FONT face=Arial size=2>Is it possible 
    that the name number becomes a variable ?</FONT></SPAN></DIV>
    <DIV><SPAN class=598405907-24092010></SPAN> </DIV>
    <DIV><SPAN class=598405907-24092010><FONT face=Arial size=2>for i = 1 : 
    n</FONT></SPAN></DIV>
    <DIV><SPAN class=598405907-24092010><FONT face=Arial 
    size=2>    creation of A1[] / A2[] / A3[] .... 
    An[]</FONT></SPAN></DIV>
    <DIV><SPAN class=598405907-24092010><FONT face=Arial size=2>end 
    for</FONT></SPAN></DIV>
    <DIV><SPAN class=598405907-24092010></SPAN> </DIV>
    <DIV><SPAN class=598405907-24092010><FONT face=Arial size=2>Please note each 
    matrix size may be different</FONT></SPAN></DIV>
    <DIV><SPAN class=598405907-24092010></SPAN> </DIV>
    <DIV><SPAN class=598405907-24092010></SPAN> </DIV>
    <DIV><SPAN class=598405907-24092010><FONT face=Arial size=2>Thanks for any 
    advice</FONT></SPAN></DIV>
    <DIV><SPAN class=598405907-24092010></SPAN> </DIV>
    <DIV><SPAN class=598405907-24092010><FONT face=Arial 
    size=2>Paul</FONT></SPAN></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>Here is an 
  example:<BR><BR>i=10;mystr="matrix_"+string(i)+"=[1 2, 3 
  4]";execstr(mystr);<BR><BR>Once you've ran it, matrix_10 is created and 
  contains [1 2, 3 4].<BR><BR>Antoine<BR><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></BODY></HTML>