title: Load all the images from a directory
body: <p>I have certain images in a directory and I want to load all those images to do some processing. I tried using the <code>load</code> function.</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>
  
  <p>I am getting an error as unable to read xyz.jpg no such file or directory found, where xyz is my first image in that directory.<br>
  I also want to load all formats of images from the directory instead of just jpg...how can i do that?   </p>