From: Vivian Harvey on
If I run the following program in 2009a ver

for j=1:10
filename=sprintf('Image %d.jpg', j);
imtool(filename);
waitforbuttonpress;
close all;
end

To display 10 images, 'Image 1.jpg' to 'Image 10.jpg' to be displayed,
-> why does an extra blank figure pop up while using imtool while by itself, imtool simply shows the image without anything else popping up?
->How can I close each image/window after it is shown once? 'close all' doesnt work except for that blank figure popping up
-> How can I free memory in this case? As the figures dont close, my Matlab crashes showing an out of memory Java error.

Thanks in advance and sorry if these questions sound very elementary :)
From: Vivian Harvey on
I have found one of the solutions...I should use 'close all hidden' instead of just 'close all' which solves one of the problems...
From: ImageAnalyst on
"Close all" does not close imtool windows. You need to do it this
way:

imtool close all;
From: Vivian Harvey on
Thanks...any idea how to deal with the other queries please?