title: How do I create a uninstantiated array of images in MATLAB
body: <p>I'm looking for a way to store a set of images in my MATLAB function. Is there a way to set aside space for n images ahead of time and initialize them later?</p>
  
  <p>I tried doing something like this:</p>
  
  <pre><code>array_of_images = zeros(1,5); % array of 5 images
  </code></pre>
  
  <p>but when I try to initialize:</p>
  
  <pre><code>array_of_images(1,1) = imread('image_01.jpg');
  </code></pre>
  
  <p>MATLAB reports <code>Assignment has more non-singleton rhs dimensions than non-singleton subscripts</code>, so I am looking for a way to do something equivalent.</p>