NEWFUNC | Create a new MATLAB function using a customizable template

Versión 1.0.0.0 (4,81 KB) por Bob Spunt
Create a new MATLAB function using a customizable template
392 descargas
Actualizado 31 oct 2016

Create a custom template for a MATLAB function with nicely formatted documentation.
Optional arguments include (for each, default values can be easily modified at top of function code):
- # of necessary arguments
- # of optional arguments (i.e., VARARGIN) [parsed as 'name', value pairs - see below for more info]
- # of output arguments
- description of function to include at top of help doc
- width of section dividers
- author name and author email for automatically generated COPYRIGHT section
- flag to include EXAMPLE section in documentation
- flag to include CREDITS section in documentation
- output directory for created m-file
- flag to open m-file in default editor after creation
When optional arguments are specified, NEWFUNC will automatically create a cell array at the beginning of the code for defining the default values of optional arguments, and will add the File Exchange contribution SETARGS to the created m-file as a subfunction. SETARGS is then called to parse VARARGIN to determine which default values to override.

Finally, by default NEWFUNC will always add a subfunction called MFILE_SHOWHELP to the created m-file. This is a utility that prints the help doc for the m-file to the command window when the function is called without any arguments.

Citar como

Bob Spunt (2024). NEWFUNC | Create a new MATLAB function using a customizable template (https://github.com/spunt/newfunc), GitHub. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2015a
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!

No se pueden descargar versiones que utilicen la rama predeterminada de GitHub

Versión Publicado Notas de la versión
1.0.0.0

Updated description.

Para consultar o notificar algún problema sobre este complemento de GitHub, visite el repositorio de GitHub.
Para consultar o notificar algún problema sobre este complemento de GitHub, visite el repositorio de GitHub.