title: Matlab: Array growing inside a loop - so what?
body: <p>I have this code (reading images into a huge matrix)</p>
  
  <pre><code>allImages = [];
  for ii = 1 : n
      img = imread( fileNames{ii} );
      img = imresize( rgb2gray(img), [100 100] );
      allImages = cat(3, allImages, img ); % append image to huge matrix
  end
  </code></pre>
  
  <p>Matlab points me to the last line in the loop warning me that <code>allIamges</code> grows inside the loop.</p>
  
  <p>So what's the big deal here? </p>