title: 'Array of arrays' in matlab?
body: <p>Hey, having a wee bit of trouble. Trying to assign a variable length 1d array to different values of an array, e.g.</p>
  
  <pre><code>a(1) = [1, 0.13,0.52,0.3];
  a(2) = [1, 0, .268];
  </code></pre>
  
  <p>However, I get the error:</p>
  
  <pre><code>???  In an assignment  A(I) = B, the number of elements in B and
   I must be the same.
  
  Error in ==&gt; lab2 at 15
  a(1) = [1, 0.13,0.52,0.3];
  </code></pre>
  
  <p>I presume this means that it's expecting a scalar value instead of an array. Does anybody know how to assign the array to this value?</p>
  
  <p>I'd rather not define it directly as a 2d array as it is for are doing solutions to different problems in a loop</p>
  
  <p><strong>Edit: Got it!</strong></p>
  
  <p>a(1,1:4) = [1, 0.13,0.52,0.3];</p>
  
  <p>a(2,1:3) = [1, 0, .268];</p>