NEWFUNC | Create a new MATLAB function using a customizable template

版本 1.0.0.0 (4.8 KB) 作者: Bob Spunt
Create a new MATLAB function using a customizable template
394.0 次下载
更新时间 2016/10/31

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.

引用格式

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

MATLAB 版本兼容性
创建方式 R2015a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Adding custom doc 的更多信息

Community Treasure Hunt

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

Start Hunting!

无法下载基于 GitHub 默认分支的版本

版本 已发布 发行说明
1.0.0.0

Updated description.

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库