title: Load all images from a folder in matlab
body: <p>I have a folder which contains multiple images,I want to load all those images and process in individually...How can i do it using matlab?
  I tried using the following piece of code, It says "Unable to read xyz.jpg. No such file or directory found"...xyz is the first file in that folder.</p>
  
  <pre><code>imagefiles = dir('F:\SIFT_Yantao\demo-data\*.jpg');      
  nfiles = length(imagefiles);    % Number of files found
   for i=1:nfiles
   currentfilename=imagefiles(i).name;
   I2 = imread(currentfilename);
   [pathstr, name, ext] = fileparts(currentfilename);
   textfilename = [name '.mat'];
  fulltxtfilename = [pathstr textfilename];
  load(fulltxtfilename);
  descr2 = des2;
  frames2 = loc2;
  do_match(I1, descr1, frames1, I2, descr2, frames2) ;
  end
  </code></pre>