title: How to read mutliple images in a for loop in MATLAB?
body: <p>I have segmented results in a folder. Those need to be read in a for loop and processed further in the loop. I tried reading as below:</p>
  
  <pre><code>for i=1:10 
  file_name=dir(strcat('C:\Users\adminp\Desktop\dinosaurs\')); 
    im=imread(strcat('C:\Users\adminp\Desktop\dinosaurs\',file_name(i).name));
    %processing of read image
  end
  </code></pre>
  
  <p>An error was thrown :??? Error using ==> imread at 370
  Can't open file "C:\Users\adminp\Desktop\dinosaurs\." for reading;
  you may not have read permission.</p>
  
  <p>Please suggest where I have gone wrong.</p>