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

Answers (2)

KALYAN ACHARJYA
KALYAN ACHARJYA on 23 Sep 2019
Edited: KALYAN ACHARJYA on 23 Sep 2019
fig=gcf
imwrite(fig,'image_result.tif'); % Change format as per requirements
This code save the current figure window in current working directory.
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

Asked:

on 23 Sep 2019

Answered:

on 23 Sep 2019

Community Treasure Hunt

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

Start Hunting!