title: Writing Tables from Matlab into CSV
body: <p>I have several tables in <strong>matlab</strong> that and I would like to write all to one <code>.csv</code> file, vertically concatenating. I would like to keep the column names from each table as the top row, and would like to use a loop to write the csv. The ultimate goal is to read the data in to <code>R</code>, but <code>R.matlab</code> did not work well. Suggestions about how to do this? </p>
  
  <p>Alternatively how can I change filenames in a for loop using the iterator?
  e.g. along the lines of</p>
  
  <pre><code>for i=1:10
      writecsv('mydatai.csv',data(i))
  end
  </code></pre>
  
  <p>So I must have at the end 10 csv files as output.</p>