title: Concatenating a numeric matrix with a 1xn cell
body: <p>When trying the following concatenation:</p>
  
  <pre><code>for i=1:1:length(Open)
      data(i,1) = Open(i);
      data(i,2) = Close(i);
      data(i,3) = High(i);
      data(i,4) = Low(i);
      data(i,5) = Volume(i);
      data(i,6) = Adj_Close(i);
      data(i,7) = cell2mat(dates(1,i));
  end
  </code></pre>
  
  <p>Where all matrices but <code>dates</code> contain double values, and <code>dates</code> is a cell array with dates in the format '2001-01-01'. Running the code above, I get the following error:</p>
  
  <pre><code>??? Subscripted assignment dimension mismatch.
  
  Error in ==&gt; Test_Trades_part2 at 81
              data(i,7) = cell2mat(dates(1,i));
  </code></pre>
  
  <p>The code above is tied to a master code which takes data from Yahoo Finance and then puts it in my SQL database. </p>