title: getting a cell array of string into a matrix or table Matlab
body: <p>I'm gathering information from calculations performed on some data and stored into arrays. I also have some info about these data coming from a text file which now and then contains strings.</p>
  
  <p>The strings from the text files got saved into a <code>{}</code> cell array of strings such as:</p>
  
  <pre><code>strings={'s1' 's2' 's3'};
  a=[1 2 3]
  </code></pre>
  
  <p>What the strings and arrays contain is generated based on a few conditionals from the data present in the text file as well as some data I have in matlab through a loop doing things like that:</p>
  
  <pre><code>srings{e}=blablahFromSomewhere{e}
  a(e)=otherNumericalBlahBlahFromSomwehre(e+6)
  </code></pre>
  
  <p>Ultimately I want to joint this into a table. I would normally do this:</p>
  
  <pre><code>T=[a(:) strings(:)]
  </code></pre>
  
  <p>But I'm facing the following error:</p>
  
  <pre><code>Error using horzcat
  Dimensions of matrices being concatenated are not consistent.
  </code></pre>
  
  <p>Can anyone help? I don't really want to transform the strings into integers because the content of the string is handier to have in the output in running the analysis.</p>
  
  <p>Thanks :)</p>