MATLAB: How to save result images

image processingMATLAB

I need to write the output figures in seperate folder……..can anyone please help me…?

Best Answer

output_folder = 'C:\Users\Sajina\Documents\MATLAB\Project9\outputs';
outfile = fullfile(output_folder, 'fig1.png');
saveas(gcf, outfile);
the file will be written into the named directory.