MATLAB: How to save the content of the current figure as an image digital image processingimageimage processingImage Processing Toolboxprogramming how to save the content(which is an image) of the current figure as an image? I have about 30 figure … I want to use MATLAB commands to save them in for loop Best Answer saveas(gcf,'filename.png')would also work.or something like thisfor i=1:30 % code to show image number i saveas(gcf,['filename' num2str(i) '.png']);endif you don't like the border around it type:iptsetpref('ImshowBorder','tight');before preparing your figure. Related SolutionsMATLAB: How to save the contour as a image Read about saveas. saveas(gcf,'myFigure.png') ;https://in.mathworks.com/help/matlab/ref/saveas.html MATLAB: Matlab R2018a does not save the whole figure I just tried fh = figure() %your figureset(fh, 'Visible','off');still no luck Related QuestionSave resize images to a folderProblem saving the figures
Best Answer