Create help text for subfunctions
3 views (last 30 days)
Show older comments
Hi
I have a script with a main function and some subfunctions under it (all in same script). I need to write help text for the subfunctions, so that the user can write help (the name of the subfunction) and then my help text will appear. Any ideas?
- Morten
1 Comment
Daniel Shub
on 4 May 2012
You have a script with a functions in it? I am pretty sure that is not supported. Assuming you have an m file with a function called myfunc and a subfunction called mysubfunc, then my subfunc cannot be called by the user so giving a help sections doesn't seem to make sense. Additionally, this could cause problems for searching for overloaded functions.
Accepted Answer
More Answers (1)
Jan
on 4 May 2012
The help command looks for the help section of the main function only. Therefore you cannot define helpsections for the subfunctions, which can be found by help SubFunctionName.
As Daniel has explained already, this would not be useful at all, because the subfunction cannot be reached externally.
0 Comments
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!