开发者

Saving a MATLAB plot via commands

开发者 https://www.devze.com 2023-02-23 17:05 出处:网络
I am using MATLAB via PuTTY , which obviously means I can\'t view plots. Is there a way to create plots and save them as a file so I can download t开发者_StackOverflow中文版hem via FTP?Yes, use the pr

I am using MATLAB via PuTTY , which obviously means I can't view plots. Is there a way to create plots and save them as a file so I can download t开发者_StackOverflow中文版hem via FTP?


Yes, use the print option. If you need to save it as an EPS, use

print(h,'-depsc',filename)

where h is your figure handle. For other rasterized formats like JPEG, PNG, etc, you can specify resolution as

print(h,'-djpeg','-r150',filename)

You have more formats to choose from, which are documented in the help file.

0

精彩评论

暂无评论...
验证码 换一张
取 消