Using 'doc' on overloaded/overridden classes: Help only shows the Matlab class documentation
3 次查看(过去 30 天)
显示 更早的评论
Hello all,
I have what is hopefully a simple issue to remedy. I have created a custom class that turns out to overload some Matlab class. I have written extensive notes/help documents into this class, and want the user to be able to type ' doc myClass' and return my documentation; however, the help window only shows the Matlab version, and the "other uses" link does not include mine.
Additional considerations:
(1) I have ensured that the class is at the top of my Matlab path
(2) The class is in the folder @myClass/myClass.m
(3) I have tried using a different case convention (if Matlab has myClass.m and I have MyClass.m, it still only directs to myClass.m 's help page.
So, how do I get 'doc' to show my documentation, short of forever avoiding overloading Matlab built-in/toolbox function names (which is impractical).
Cheers,
-Dan
0 个评论
采纳的回答
Sreelakshmi S.B
2019-3-5
I don't think there's any quick way to do this .If you go through the 'Description' section of the documentation for doc- https://www.mathworks.com/help/releases/R2018b/matlab/ref/doc.html- you can see that the first check is for a MathWorks Reference page.
This is not the case for the help function.You can go through the documentation for help here:https://www.mathworks.com/help/releases/R2018b/matlab/ref/help.html
Of course,a possible workaround would be to modify the code for doc.m (use 'edit doc' in the matlab terminal after changing permissions) so that it checks for custom documentation first.May not be the best solution but it'll work.
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!