title: Error reading an animated GIF file in Matlab
body: <p>I read GIF files in the following way:</p>
  
  <pre><code>[image, map] = imread(imagePath, 'frames', 1);
  </code></pre>
  
  <p>However, reading the GIF image posted below I get the following error message:</p>
  
  <pre><code>Subscripted assignment dimension mismatch.
  
  Error in readgif&gt;read_multiframe_gif (line 117)
      [X(:,:,:,j) undisposed_index] =
      handle_positive_base_frame(data{j},info(j),X(:,:,:,undisposed_index),X(:,:,:,j-1),undisposed_index,j);
  
  Error in readgif (line 36)
  [X,map] = read_multiframe_gif(filename);
  
  Error in imread (line 435)
      [X, map] = feval(fmt_s.read, filename, extraArgs{:});
  </code></pre>
  
  <p>Is it because the GIF file is corrupted or is there another problem?</p>
  
  <p><img src="https://i.stack.imgur.com/2Hghq.gif" alt="enter image description here"></p>