change dpi from auto to 300 using matlab code?
15 次查看(过去 30 天)
显示 更早的评论
Is there any code to change the DPI from auto mode to 300 so that It can be added to the script directly,without manually going and changing in the picture settings?
2 个评论
采纳的回答
Rik
2018-6-22
This code should work. I recognize the -k switch from a similar context, but the doc indicates that you should use -r. (I use sprintf so you can mistakenly enter a decimal res, Matlab will round it anyway during the writing of the image)
figure(1),clf(1)
plot(randi(10,1,10))
res = 300;
print('figure1.tiff','-dtiff',['-r' sprintf('%.0f',res)]);
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!