Using 'doc' on overloaded/overridden classes: Help only shows the Matlab class documentation

조회 수: 1 (최근 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

채택된 답변

Sreelakshmi S.B
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개)

카테고리

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

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by