How to generate the custom help box for a custom function (More Help...)
24 次查看(过去 30 天)
显示 更早的评论
Hi everyone,
I recently dealt with proper help for my custom functions.
I found out that there are 4 points one can handle:
- doc myfun: Will show file help or if available the html help (https://de.mathworks.com/help/matlab/matlab_prog/display-custom-documentation.html)
- writing your function, then typing in the opening bracket and waiting. A small box will appear showing input parameters
- help myfun: Will display the comments at the top of the function (https://de.mathworks.com/help/matlab/matlab_prog/add-help-for-your-program.html)
- tab completion with functionSignatures.json (https://de.mathworks.com/help/matlab/matlab_prog/customize-code-suggestions-and-completions.html and also https://undocumentedmatlab.com/articles/user-defined-tab-completions-take-2)
For 2.: Where can I find how to do this? For custom functions, only the input parameters are shown. But for Matlab Built-Ins, all available syntaxes are shown. They sometimes even differ from the "syntax" part in the html help, see movmean function help and the "bracket opening"-help for the info on datetime object, see picture below.
Are there even other "standard" help functionalities besides the four above?
![question.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/253589/question.png)
Thanks for some advice.
0 个评论
回答(3 个)
Ran
2020-1-5
I encountered the same issue.
Is there a solution (for the normal editor, not the live-script editor) ?
1 个评论
Jan Kappen
2020-5-13
+1...
I bet the normal editor shall be replaced soon, no updates were made a long time and all efforts were spent to the javascript/online interface.
Andrii Zelenko
2021-7-10
I guess this might be helpful: https://www.mathworks.com/help/matlab/matlab_prog/add-help-for-your-program.html
You basically just add comments at the begining of your custom funciton and aafter typing
help your_custom_function
comments will poped up
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!