MATLAB: Improving the image quality

image qualitity

Hi guys
I have a problem with the image quality, when i save the result as .jpg, the quality is reduced, please help me, how can I solve it ?

Best Answer

If you use print() instead of saveas(), then you can give a resolution by using a '-r' option. For example,
set(gcf,'PaperPositionMode','auto')
print('YourFileName.jpg','-djpeg','-r0') %note correction compared to my earlier comment
which would print at screen resolution.