Be the first to rate this file! 31 downloads (last 30 days) File Size: 3.67 KB File ID: #25092

saveas2.m v1.1 (Sep 2009)

by Carlos Adrian Vargas Aguilera

 

20 Aug 2009 (Updated 30 Sep 2009)

Code covered by the BSD License  

Saves current figure matching its size with specific extension and resolution.

Download Now | Watch this File

File Information
Description

This function is a modification of SAVE2PDF by Gabe Hoffmann.

It saves the current (or specified handle's) figure to the given filename (if not given, it displays a gui to introduce it). If the image extension is not valid or 'unknown' it also displays a menu with valid ones.

It's as easy as SAVEAS but with extra inputs (all optionals).

For example, to save the current figure to (defaults) PNG and 150x150 pixels use
>> saveas2('myfigure')
and that's it. Or to 300x300 pixels in JPG:
>> saveas2('myfigure.jpg',300)

Or as 'fig':
>> saveas2('myfigure.fig')

It accepts multiple inputs.

Enjoy it!
(Bugs reports ans suggestions will be very appreciated)

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
save2pdf

MATLAB release MATLAB 7.7 (R2008b)
Zip File Content  
Other Files license.txt,
saveas2.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
30 Sep 2009

v1.1 Fixed important bug with '.fig' output.

Tag Activity for this File
Tag Applied By Date/Time
saveas Carlos Adrian Vargas Aguilera 21 Aug 2009 11:50:03
print Carlos Adrian Vargas Aguilera 21 Aug 2009 11:50:04
png Carlos Adrian Vargas Aguilera 21 Aug 2009 11:50:04
eps Carlos Adrian Vargas Aguilera 21 Aug 2009 11:50:04
pdf Carlos Adrian Vargas Aguilera 21 Aug 2009 11:50:04
bmp Carlos Adrian Vargas Aguilera 21 Aug 2009 11:50:04
image Carlos Adrian Vargas Aguilera 21 Aug 2009 11:50:04
imwrite Carlos Adrian Vargas Aguilera 21 Aug 2009 11:50:04
pixel Carlos Adrian Vargas Aguilera 21 Aug 2009 11:50:04
gcf Carlos Adrian Vargas Aguilera 21 Aug 2009 11:50:04
fig Carlos Adrian Vargas Aguilera 21 Aug 2009 11:50:04
hgsave Carlos Adrian Vargas Aguilera 21 Aug 2009 11:50:04
save Carlos Adrian Vargas Aguilera 21 Aug 2009 11:50:04
bmp PraveenKumar Jayaram 26 Aug 2009 07:00:05
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com