scilab: adding vector to matrix
<p>if I want to add an element to a vector in scliab I can use <code>$+1</code> index:  </p>

<pre><code>--&gt;t($+1)=rand()
 t  =

    0.2113249  

--&gt;t($+1)=rand()
 t  =

    0.2113249  
    0.7560439  

--&gt;t($+1)=rand()
 t  =

    0.2113249  
    0.7560439  
    0.0002211  

--&gt;t($+1)=rand()
 t  =

   0.2113249  
   0.7560439  
   0.0002211  
   0.3303271  
</code></pre>

<p>So why if I want to add a row or column to an empty matrix I get a zero row or column?  </p>

<pre><code>--&gt;U(:,$+1)=t
 U  =

    0.    0.2113249  
    0.    0.7560439  
    0.    0.0002211  
    0.    0.3303271  

--&gt;U(:,$+1)=t
 U  =

    0.    0.2113249    0.2113249  
    0.    0.7560439    0.7560439  
    0.    0.0002211    0.0002211  
    0.    0.3303271    0.3303271  

--&gt;Z($+1,:)=t'
 Z  =

    0.           0.           0.           0.         
    0.2113249    0.7560439    0.0002211    0.3303271  

--&gt;Z($+1,:)=t'
 Z  =

    0.           0.           0.           0.         
    0.2113249    0.7560439    0.0002211    0.3303271  
    0.2113249    0.7560439    0.0002211    0.3303271  
</code></pre>

<p>Best regards
Max</p>