Ghostscript error with print function in Matlab
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am trying to save images in Matlab by using the print function: myImage = magic ( 500 ); myFigure = figure ( 'visible' , 'off' ); r = 1 ; set ( myFigure , 'PaperUnits' , 'inches' , 'PaperPosition' , [ 0 0 1920 1080 ]/ r ); % the program works fine on both computers without the line above % however , the program runs fine on one computer only with this line imagesc ( myImage ); axis image ; print ( myFigure , '-dpng' , sprintf ( '-r%d' , r ), 'myOutput.png' ); When I run this program locally with Matlab R2012b, it works as