title: How can I access all field elements of a structure array nested in a cell array in MATLAB?
body: <p>Here's code that creates an example cell array for this question:</p>
  
  <pre><code>mycell = cell([5,1]);
  for i = 1 : size(mycell)
      mystruct = struct();
      mycell{i} = mystruct;
      mycell{i}.field1 = i;
  end
  </code></pre>
  
  <p>I expected <code>mycell{:}.field1</code> to do what I want, but it gives an error.  I can use the following for loop:</p>
  
  <pre><code>for i = 1 : size(mycell)
      mycell{i}.field1
  end
  </code></pre>
  
  <p>but I'd prefer a simpler or more elegant solution as a want to use all the elements of mycell.field1 as the y-variables in a plot.  Any ideas?  </p>