Dean Barnes
Dean Barnes

Reputation: 2272

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 them via FTP?

Upvotes: 0

Views: 672

Answers (1)

abcd
abcd

Reputation: 42235

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.

Upvotes: 4

Related Questions