MATLAB: How to save an image run time with a title

digital image processingimage analysisImage Processing Toolbox

My program gives some output images using some loops and is capable to store output images in run time. However, I want to save the image with a title containing the value of loop variable without displaying it. How it will be possible.

Best Answer

title( sprintf('The value of the variable as %g', LoopVariableNameGoesHere) )
Or perhaps you mean something like
filename = sprintf('QZT32_P%03d.png', LoopVariableNameGoesHere);
imwrite(YourImageData, filename);