I believe you are looking for an option to set the size of an image when exporting from Matlab to another format, let say eps or jpg. Use the following command line:
figure, plot(x,x), etc.
fig = gcf;
fig.PaperUnits = 'inches';
fig.PaperPosition = [0 0 a b];
"0 0" is the coordination of the lower left of figure (origin), and "a b" is the coordination of the upper right of the figure. So, "a" is the width and "b" is the height.
Afterwards, you can either use save as, or print or etc.
Open your image (figure) in Matlab. Then go to 'File' menu and select "Export Setup".
In the opened Export wizard, select "Rendering" tab and enter a value between 1500 ~ 1800 in Resolution(DPI) field to export a good quality image. Finally click on "Apply to figure" bottom and Export it in any format you need.