M-file Header Template

Promotes better m-file documentation by encouraging authors to produce informative headers.
14.1K descargas
Actualizado 14 May 2004

Ver licencia

To contribute to better standards of m-file documentation on the MATLAB Central File Exchange, I am proposing a template m-file header.

The template starts with the H1 line, followed by a few lines to describe what the function does in greater details, the calling syntax, a description of each input and output variable, a practical example of function usage, information concerning other m-files or mat-files that may be required for this function to run, and a "See also" line leading to closely related functions. This ends the block of header lines that are displayed in the command window by typing "help function_name".

After an empty uncommented line, a second block of commented lines presents information about the author: name, job title, email, website, dates of file creation and last file modification. Finally, there is a %---Begin code --- line and a % --- End code --- line.

I have surely overlooked to include information that other m-file authors consider essential. If you have suggestions to improve the template, I would appreciate hearing about them and I will try to include them in a future version. Please do not make a separate submission on the File Exchange for relatively minor modifications to this template. New submissions on the File Exchange that are based on existing submissions should only be considered when major changes in functionality are offered by the new submission (IMHO).

You should edit template_header.m and save a customized version of it containing your own personal info, as shown in template_dg.m. This will save you from typing repetitive author info each time you create a new m-file.

Citar como

Denis Gilbert (2024). M-file Header Template (https://www.mathworks.com/matlabcentral/fileexchange/4908-m-file-header-template), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R13
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Adding custom doc en Help Center y MATLAB Answers.

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
1.0.0.0