title: matlab: structural data and multi-level indexing
body: <p>I have a simple problem with structures.</p>
  
  <p>Lets create:</p>
  
  <pre><code>x(1).a(:, :) = magic(2);
  x(2).a(:, :) = magic(2)*2;
  x(3).a(:, :) = magic(2)*3;
  </code></pre>
  
  <p>how to list a(1, 1) from all x-es?</p>
  
  <p>i wanted to do it like:</p>
  
  <pre><code>x(1, :).a(1,1)
  </code></pre>
  
  <p>but there is an error "Scalar index required for this type of multi-level indexing."</p>
  
  <p>How to approach it? I know I can do it with a loop, but that's probably the worst solution :)
  Thanks!</p>