title: Exporting cell array with both text and numbers to csv file in Matlab
body: <p>I have a cell array with nine columns (the first eight text and the ninth numbers) and thousands of rows that I would like to export to a csv file. </p>
  
  <p>I have tried to follow the suggestions provided in similar questions and I take that the best way to proceed is to use the <code>fprintf</code> function:</p>
  
  <pre><code>fid = fopen(outputfile, 'w')
  fprint(fid, ???, variable{:,:})
  fclose(fid)
  </code></pre>
  
  <p>Nevertheless, I cannot figure out what I am supposed to write in the middle. I have tried several combinations using <code>"%s"</code>, <code>"\n"</code>, <code>"\t"</code>, but it does not seem to work. Ideally, I would like to separate each column by either a <code>";"</code>, <code>","</code> or a tab, and to make sure that the decimals of the values are not lost.</p>