Hi Adrien,<br><br>Thanks for your reply, but that's not exactly what I meant.<br>I understand in your example we're dealing with passing variables through different functions. In my case, it's all inside the same function.<br>

Also, apparently the behaviour is erratic: it works sometimes and sometimes not.<br><br>Regards,<br><br><div class="gmail_quote">On Tue, Jun 14, 2011 at 10:26 AM, Adrien Vogt-Schilb <span dir="ltr"><<a href="mailto:vogt@centre-cired.fr">vogt@centre-cired.fr</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

  
    
  
  <div bgcolor="#ffffff" text="#330000">
    Hi Edouardo<br>
    <br>
    This is not a bug, but a feature!<br>
    <br>
    you should read this :
    <a href="http://wiki.scilab.org/howto/global%20and%20local%20variables" target="_blank">http://wiki.scilab.org/howto/global%20and%20local%20variables</a><br>
    <br>
    In the commented example, look for the following line : <br>
    <pre>  x(3)=56          // note that at this point x=[0 0 56] because of 3. above, *not* [45 0 56]

this is exactly want happened to you
</pre><div><div></div><div class="h5">
    <br>
    <br>
    On 13/06/2011 22:11, Eduardo Torrecillas wrote:
    <blockquote type="cite">Hi all,<br>
      <br>
      I have some piece of code and noticed some strange behaviour. As
      the code is complex and involves external compilation, it is a
      little bit difficult to post it here, so I will try to explain it
      in a general way.<br>
      <br>
      At some point in the code, I have a structure called interpolados,
      having 3 matrices. So, I have<br>
      <br>
      interpolados(1).matriz<br>
      interpolados(2).matriz<br>
      interpolados(3).matriz<br>
      <br>
      all of them are sized 497 x 95.<br clear="all">
      <br>
      Later on, when trying to substitute a column of one of this
      matrices, I get it destroyed.<br>
      The syntax I'm using is:<br>
      <br>
      interpolados(1).matriz(:,3)=13<br>
      <br>
      I was expecting to maintain the matrix and change only its third
      column, all with 13. Actually what I'm getting is that
      interpolados(1).matriz is no longer 497 x 95, but 497 x 1 (only 1
      column, all full with 13).<br>
      <br>
      System summary: Ubuntu 10.10 64bit + Scilab 5.3.2<br>
      <br>
      Has anybody experienced that? Any issues?<br>
      <br>
      Regards,<br>
      <br>
      <br>
      -- <br>
      Eduardo Torrecillas<br>
    </blockquote>
    <br>
    <br>
    </div></div><div>-- <br>
      
      <p><b>Adrien Vogt-Schilb</b></p>
      <p>Research Fellow</p>
      <p><a href="mailto:vogt@centre-cired.fr" style="text-decoration: none; color: teal;" target="_blank">vogt@centre-cired.fr</a></p>
      <p>Tel: (+33) 1 43 94 73 96</p>
      <p>Fax: (+33) 1 43 94 73 70</p>
      <table style="border: medium none; margin-left: 1pt; margin-top: 4pt;" cellspacing="0">
        <tbody>
          <tr>
            <td style="padding: 0pt;">
              <p><img src="" alt="CIRED" width="54"></p>
            </td>
            <td style="padding: 0pt 7pt;" valign="middle">
              <p style="font-size: 10pt;">45 bis, Av de la Belle
                Gabrielle</p>
              <p style="font-size: 10pt;">F-94736 Nogent-sur-Marne</p>
              <p style="font-size: 10pt;"><a href="http://www.centre-cired.fr/" style="color: teal;" target="_blank">http://www.centre-cired.fr/</a></p>
            </td>
          </tr>
        </tbody>
      </table>
      <p> </p>
    </div>
  </div>

</blockquote></div><br><br clear="all"><br>-- <br>Eduardo Torrecillas<br>AER-09<br>