title: Replace element of table inside struct variable (Matlab)
body: <p>Is it possible to replace certain element of table inside struct variable? I use this syntax, but it gives me an error message.</p>
  
  <pre><code>    File.Jan.Date(1,1) = Date2(1,1);
  </code></pre>
  
  <p>Here Date2 is 1x1 table and File.Jan.Date is a 70082x2 table. </p>
  
  <p>Here is the error message:</p>
  
  <blockquote>
    <p>The following error occurred converting from datetime to cell: Error
    using cell Conversion to cell from datetime is not possible.</p>
  </blockquote>
  
  <p>I try a simpler example like this:</p>
  
  <pre><code>Date=datestr('02/02/2012','mm/dd/yyyy')
  Date = datetime(Date,'InputFormat','MM/dd/yyyy');
  Date.Format = 'MM/dd/yyyy'
  T = table(Date,'VariableNames',{'Date'})
  T(1,1)=Date
  </code></pre>
  
  <p>And gives me error message below</p>
  
  <blockquote>
    <p>Right hand side of an assignment into a table must be another table or
    a cell array.</p>
  </blockquote>