|Refer to the example code below.
x=(1:2:10)
y=(1:2:10)
plot(x,y)
size = [200 200];
res = 300;
set(gcf,'paperunits','inches','paperposition',[0 0 size/res]);
print('resized.tiff','-dtiff',['-r' num2str(res)]);
Here I have set the width and height to be 200. Resolution is set to 300dpi. To set the properties(“paperunnits” and “paperposition”) of the image, you could use the “set” function. “print” function is used to set the resolution to 300dpi.|
Best Answer