MATLAB: How to automatcly save a plot in matlab plottingsave I have a loop that do plotting. Is there a way instead of manually saving the graph the plots automatically be saved? Best Answer Simple example:x = linspace(0,1,100);for k=1:10 stem(x,x/k) ylim([0 1]) filename = sprintf('pic%i',k); print('-djpeg', filename, '-r100');end Related SolutionsMATLAB: How to create a dynamic file name when printing to jpeg print('-djpeg', [idstring,'.jpeg']) MATLAB: Save figure h=figure('visible','off');plot(h,1:10);saveas();close(h); Related QuestionHow to specify the output sizes of JPEG, PNG, and TIFF images when using the PRINT function in MATLABHow can i have three plots on one graph and save all three plots using one nameChange of saving folder with each iteration
Best Answer