Saving a MATLAB plot via commands
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.
精彩评论