How to export figure to a file

4 views (last 30 days)
James
James on 11 Apr 2014
Answered: Azzi Abdelmalek on 11 Apr 2014
Hi,
I am running a script and at the end I am outputing a figure with a few graphs on it. Is there any way, in the script, I can get it to automatically save it as a picture (jpeg or whatever) to a specific file on my computer?
Thanks

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 11 Apr 2014
h=plot(x,y)
saveas(h,'FileName.jpg')

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!