New m-file (dynamical/document​ed header)

버전 1.0.0.0 (3.8 KB) 작성자: Benjamin Pillot
new m-file with dynamical/documented header acting as the usual "new file" matlab desktop shortcut
다운로드 수: 459
업데이트 날짜: 2016/5/11

라이선스 보기

This function creates a new class/function/script following the same behaviour as the "new file" desktop short-cut, except that headers are dynamically implemented, customizable and adapted for further code documentation.
The function comes with 3 default headers corresponding to 'class', 'function' and 'script' files. Feel free to adapt these header files to your own needs. They have been implemented based on the template headers proposed by Denis Gilbert, in order to facilitate the further code documentation (using mtoc++/doxygen for example).
Even if the templates are customizable, some part are implemented dynamically during the opening of the new class/function/script, such as date of creation, file name, copyright year, etc.
Basically, I have made a compilation of different tools available on the File exchange. But I wanted a tool both simple and powerful, and, most of all, able to efficiently replace the "new file" Matlab desktop short-cut, in such a way that it remains invisible to the user. To do this, you just have to add a short-cut to your short-cut toolbar using the Shortcut Editor, with callback : "new('f')" (function), "new('s')" (script) or "new('c')" (class).
Add command to Shortcut panel :
- On the Home tab, click New, and then select Command Shortcut. Or click on the "New Shortcut" in the quick access toolbar.
- In the Shortcut Editor, choose a "Label" (such as "new function"), an Icon (such as "f") and fill the "Callback" edit text panel with the corresponding command (such as "new('f')").
- Click "Save".
That's all. Whenever you want to change the headers' format, edit the corresponding file('default_function', 'default_class' or 'default_script') and save changes.

인용 양식

Benjamin Pillot (2024). New m-file (dynamical/documented header) (https://www.mathworks.com/matlabcentral/fileexchange/57079-new-m-file-dynamical-documented-header), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2014a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Buffer templates/

버전 게시됨 릴리스 정보
1.0.0.0

Picture update

Description update