Sharing screenshots with Flickr
Go look to the file exchange and you will see some really incredible things people are doing with MATLAB. Posting code to the File Exchange is a good way to share, but we are always looking for other ways to help people share their MATLAB-related work. Flickr is a way to store, sort, search and share your photos online. For a limited time only, I have made a Flickr account where you can post your MATLAB figure screenshots with one command. To do this, you will need to get some code from my buddy Rich.
ShareIt: uses MATLAB’s print command to print one or more figures or models to file, one file per figure/model, and then uses MATLAB’s sendmail command to email the output to one or more users. It supports adding Flickr tags to the email so the image can be tagged when emailed to your Flickr account.
Once you have sendmail configured in MATLAB, then you can use the following wrapper code to send things to my Flickr account:
%% FLICKR send specified figure to MATLABDoug's account on Flickr.
% This account is not guaranteed to stay active.
fig = gcf;
%% setup the options to know what and how to share
% what I'm sending
myOptions.toSend = fig;
% who to send it to
myOptions.mailTo = 'firstname.lastname@example.org'% fill in email address here
% pattern for temp output file
myOptions.baseFile = [tempdir 'test'];
% format of output to create
% body of the email message
myOptions.message = description;
% subject of the email message
myOptions.subject = ['Output from MATLAB v' version];
% text to put into tags: line @bottom of email message
myOptions.tags = 'MATLAB';
% do I want the temporary files deleted?
myOptions.delete = 1;
%% export and share
disp('Screen capture shared. Thank you!')
disp('In a few minutes you should find it here:')
Opening up my Flickr account for all to use is an experiment. I will be closing the permissions on the account Friday, but the code will still work later if you change the e-mail on line 13 to your Flickr submission address. Show us what you’re working on: What’s in your MATLAB figure right now that you’d be willing to share with the world?
Get your figure ready
要发表评论，请点击 此处 登录到您的 MathWorks 帐户或创建一个新帐户。