title: error in storing captured images in a structure
body: <p>I want to capture 100 images from my webcam and then store them in a structure. I'm trying to do it like this but i'm getting the error, <code>'subscripted assignment dimensions mismatch'</code>.</p>
  
  <p>The code is this:</p>
  
  <pre><code>sep_images=struct('images',[]);
  
  
  vid=videoinput('winvideo',1,'YUY2_320x240');
  
  set(vid,'FramesPerTrigger',Inf);
  set(vid,'ReturnedColorspace','rgb');
  
  vid.FrameGrabInterval=1;
  
  start(vid)
  
  
  for num_frames= 1:100
  
      im=getsnapshot(vid);
  
     sep_images.images(num_frames)=im;
  
  end
  
  stop(vid);
  </code></pre>
  
  <p>and it is giving me the error in this statement, <code>sep_images.images(num_frames)=im;</code>.
  If someone has the idea of how to do it? please let me know.</p>