MATLAB: Save figure in backround job

no displayprint figuresave figure

Hi,
I am running a matlab job on an external computer. Figure display is not possible. However, I would like to save figures while the job is running between. I tried the following:
(extract from the code)
for ii = 1:1:100
% …working with Frame …
figure('visible','off')
imshow(Frame);
print(gcf,'-dpng', ['frame' num2str(ii),'.png']);
close(figure)
end
but it doesn't work. Does anyone have an idea how to realize that? I really prefer to save the images and not to keep the data sets.
Thanks a lot in advance.
Franziska

Best Answer

Your code should work.. If not try..
doc imsave