How to generate the custom help box for a custom function (More Help...)

조회 수: 32 (최근 30일)
breathi
breathi 2019년 12월 9일
답변: Andrii Zelenko 2021년 7월 10일
Hi everyone,
I recently dealt with proper help for my custom functions.
I found out that there are 4 points one can handle:
  1. doc myfun: Will show file help or if available the html help (https://de.mathworks.com/help/matlab/matlab_prog/display-custom-documentation.html)
  2. writing your function, then typing in the opening bracket and waiting. A small box will appear showing input parameters
  3. 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)
  4. 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
Thanks for some advice.

답변 (3개)

Sahithi Kanumarlapudi
Sahithi Kanumarlapudi 2019년 12월 18일
You can refer to a similar question here
  댓글 수: 1
breathi
breathi 2019년 12월 18일
편집: breathi 2019년 12월 18일
Hi there,
this question you linked does not seem to be answered at all. From what I understood, this refers to point 4 I mentioned and is only referring to live scripts, not the command window? See Jan's comment.

댓글을 달려면 로그인하십시오.


Ran
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
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
Andrii Zelenko 2021년 7월 10일
You basically just add comments at the begining of your custom funciton and aafter typing
help your_custom_function
comments will poped up

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by