Can 'export Figure' be written in command without clicking figure settings by hands ?

1 view (last 30 days)
I'm saving figures by using 'File -> export setup'. Here I can set the figure 'height and width', and then 'dpi'.
I have lots of figures to save.
Is there any command can do the process to set the figure 'height and width', and then 'dpi' and save the figure ?

Accepted Answer

wenhao yang
wenhao yang on 4 Mar 2021
I found it.
set(gcf,'unit','centimeters','position',[10 10 25 20]);
print(gcf,'-djpeg','-r600',PATH);
25: height,cm
20: width.cm
-r600: 600 dpi
Thanks for my work. LOL~!

More Answers (0)

Categories

Find more on Printing and Saving in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!