How do I create a dynamic file name when printing to jpeg?
1 view (last 30 days)
I have a function which generates the same plot for multiple data sets. My goal is to save each plot under a unique filename. It looks something like this:
print -djpeg test.jpeg
This will overwrite the same jpeg each time. What I would like to have is test01.jpg, test02.jpg and so on corresponding to the string identifying each data set (i.e. test01, test02). I have tried dropping the string into the print command, but to no avail.
print -djpeg horzcat(idstring,'.jpeg')