title: resize images and keep them with new size in new folder in matlab
body: <p>I write the following code in matlab. from this code I take sequence of images as input from a folder and resize these images. Now I need to store them with new size on output folder.  any one help me to update this code.  </p>
  
  <pre><code>fileFolder = fullfile('D:','Texture DataBases','images3000');
  dirOutput = dir(fullfile(fileFolder,'image*.jpg'));
  fileNames = {dirOutput.name};
  
  for k=1:length(fileNames)
                     H=fileNames{k};
                S=imread(H); 
                I-resize(S, [300 300]);
  imshow(I);
  end
  
  ......
  ......
  </code></pre>