Create help text for subfunctions
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
Daniel Shub
2012-5-4
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.
采纳的回答
更多回答(1 个)
Jan
2012-5-4
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!