title: How to store string matrix and write to a file?
body: <p>I don't know if Matlab can do this, but I want to store some strings in a 4×3 matrix, each element in the matrix is a string.</p>
  
  <pre><code>test_string_01  test_string_02  test_string_03
  test_string_04  test_string_05  test_string_06
  test_string_07  test_string_08  test_string_09
  test_string_10  test_string_11  test_string_12
  </code></pre>
  
  <p>Then, I want to write this matrix into a plain text file, either comma or space delimited.</p>
  
  <pre><code>test_string_01,test_string_02,test_string_03
  test_string_04,test_string_05,test_string_06
  test_string_07,test_string_08,test_string_09
  test_string_10,test_string_11,test_string_12
  </code></pre>
  
  <p>Seems like <code>matrix</code> data type is not capable of storing strings. I looked at <code>cell</code>. I tried to use <code>dlmwrite()</code> or <code>csvwrite()</code>, but both of them only accept matrices. I also tried <code>cell2mat()</code> first, but in that way all letters in the strings are comma seperated, like</p>
  
  <pre><code>t,e,s,t,_,s,t,r,i,n,g,_,0,1,t,e,s,t,_,s,t,r,i,n,g,_,0,2,t,e,s,t,_,s,t,r,i,n,g,_,0,3
  </code></pre>
  
  <p>So is there any way to achieve this?</p>