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

3 visualizaciones (últimos 30 días)
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

Respuesta aceptada

Sreelakshmi S.B
Sreelakshmi S.B el 5 de Mzo. de 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.

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by