title: Matlab: collect all results from multiple run script
body: <p>I'm got a script that produce a column of 36 values.
  I would save these 36 values in rows in Excel.</p>
  
  <p>At the moment, I have to run the script each time so I can change the xlrange value, eg: A1 to A1000.</p>
  
  <p>I tried looping the script, and tried to write the values into a new column of a new variable, say <code>mm</code>.</p>
  
  <pre><code>For i=1:1000
  Scriptnamehere
  mm(i,:)=m or mm(:,i)
  
  Write in excel script here
  End
  </code></pre>
  
  <p>It failed to recognize i for <code>mm</code>.</p>