how to save the content of the current figure as an image?
438 views (last 30 days)
Mohammad Abouali on 19 Sep 2014
Edited: Mohammad Abouali on 19 Sep 2014
would also work.
or something like this
% code to show image number i
saveas(gcf,['filename' num2str(i) '.png']);
if you don't like the border around it type:
before preparing your figure.
More Answers (3)
Francesco Ciriello on 20 Nov 2019
Save current figure
Save current axis
Mikhail on 18 Sep 2014
Image Analyst on 18 Sep 2014
Use imwrite() if you just want to save the image you display. If you want to save the axes or figure, use export_fig(). http://matlab.wikia.com/wiki/FAQ#How_do_I_save_my_figure.2C_axes.2C_or_image.3F_I.27m_having_trouble_with_the_built_in_MATLAB_functions.