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

4 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

Sreelakshmi S.B
Sreelakshmi S.B il 5 Mar 2019
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.

Più risposte (0)

Categorie

Scopri di più su Help and Support in Help Center e File Exchange

Prodotti


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by