MATLAB: Problem with batch processing

image processing

I want to get all my images(which located in 1 file) processed. This is the code i used(attached,herewith).
1st problem is once the 1st image is processed,how to make it to jump to the next image for processing.
2nd problem is how to change the name of the saved figure at each cycle(eg:S3-Pic1, S3-Pic2, S3
-Pic3 ..etc). Appreciate your feedback.

Best Answer

Both of these questions are explained well in the FAQ entry: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F