title: In Matlab, is it possible to concatenate matrices with brace indexing?
body: <p>I am trying to concatenate a matrix of the form <code>A  = [A ; a]</code> but where I have a loop. So in fact, something along the lines of</p>
  <pre><code>for j=1:H
  for k=1:N
        
       Z{j} = zeros(T-j,N);
       Z{j}(:,k) = ones(T-j,1);
       
       A{j}=[];
       A{j}=[A{j}; Z{j}];
  end
  end
  </code></pre>
  <p>The issue I am having is that whilst I do  get <code>A{j}</code> for <code>1</code> to <code>H</code>, the inside elements are not working for some reason. Basically <code>A{j}=[A{j}; Z{j}];</code> does not seem to work for some reason. Is it because it is brace indexed?</p>