How to save imshowpair figure?

I want to save the figure of imshowpair. How to do that? My code is like this. Which function I should use for saving these figure and where to put it?
Screen Shot 2019-09-23 at 12.54.04.png

Réponses (2)

KALYAN ACHARJYA
KALYAN ACHARJYA le 23 Sep 2019
Modifié(e) : KALYAN ACHARJYA le 23 Sep 2019

0 votes

fig=gcf
imwrite(fig,'image_result.tif'); % Change format as per requirements
This code save the current figure window in current working directory.
darova
darova le 23 Sep 2019

0 votes

You can use saveas
saveas(gcf,'test.jpg', 'jpg')
% saveas(gcf,'test.fig', 'fig') % save as MATLAB figure
I use export_fig for saving images

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by