title: access struct data (matlab)
body: <p><code>a= struct('a1',{1,2,3},'a2',{4,5,6})</code></p>
  
  <p>how can Iget the value of 1;</p>
  
  <p>I try to use a.a1{1} which return errors</p>
  
  <pre><code>&gt;&gt; a.a1{1}
  ??? Field reference for multiple structure elements that is followed by more reference blocks is an
  error.
  </code></pre>
  
  <p>How can I access 1? Thanks.</p>
  
  <p><strong>Edit</strong>
  <code>A = struct{'a1',[1 2 3],'a2',[4 5 6]}</code></p>
  
  <p>How can I access 1. I use <code>A(1).a1</code> but I get <code>1 2 3</code></p>