MATLAB: How to save .eps files with different figures

epsfiguresave

So I am running a loop with various names and I am plotting a figure for each. I have the code
saveas(gcf,[names(ii,:) '.eps'], 'epsc')
How do I label each figure so they save differently within each name? Each figure is different. Thanks

Best Answer

You could set the name of each figure by
set(gcf,'name',['figure number ',num2str(figNum(i))])
Then when saving each figure use
get(gcf,'name')
to get the name of the figure. Then save the figure with that name.
Related Question