Code covered by the BSD License  

Highlights from
print a gif in matlab

5.0

5.0 | 1 rating Rate this file 13 Downloads (last 30 days) File Size: 1.73 KB File ID: #27829

print a gif in matlab

by

 

printgif prints gif files in matlab

| Watch this File

File Information
Description

% printgif(varargin) prints gif files in matlab
% printgif accepts all print arguments in varargin.
% printgif ignores all printer drivers passed to it
% ('-deps', '-dtiff', etc.)
% instead it used the -djpeg100' driver and converts
% the resulting jpg file to a gif using
% imread/rgb2ind/imwrite
%
% EXAMPLE:
% printgif(gcf,'foo')
% prints the file foo.gif

MATLAB release MATLAB 7.9 (R2009b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
06 Jun 2010 Donn Shull

Hi Ben,

This is a nicely written file with good help, an H1 line and helpful comments in the code. I have a few suggestions if you want to make your function a little more like a MathWorks function.

You may wiant to consider changing the name. When I first saw your submission I thought it was for sending a gif file to a printer. Some alternate names might be fprintgif, writegif, or imwritegif.

Your file has an all lowercase name. This is the standard case for MathWorks api functions. The MathWorks uses an uppercase version of the function name on the H1 line without the argument list. This makes the H1 line stand out and without the arguments list there is more room for the description on the H1 line.

The MathWorks help usually follows the H1 line with some form of syntax help for calling the function and descriptions of the required inputs. You may want to consider explicitly naming the required inputs figure, and filename and checking that they are correct and then explaining them in the help.

The MathWorks includes a See Also section in their help. In this case you may want to reference print, imread, and imwrite.

Your help text is indented one space more than what The MathWorks uses.

These are all just suggestions.

Donn

Contact us