No F1-help for class object
2 views (last 30 days)
Show older comments
Hello,
Is it possible to display the 'function help' from a function inside a custom class object by pressing the 'F1' key?
Context: While working on a live script i like to use the 'function help' feature of Matlab. Usually i write the function name and press the 'F1' key to display the description of that function. However, as i was working with an user-defined class i noticed a strange behaviour regarding this workflow.
My functions of the class are commented this way:
classdef myclass < handle
properties
value1
end
methods
function CalcThis(obj)
%% Function: myclass.CalcThis
% Purpose: This function calculates values based on some
% previously defined properties.
...
end
end
end
When i create an object based on this class and want to display the description, i would do it this way and press 'F1'
eg = myclass;
eg.CalcThis;
Matlab simply outputs 'No help found for eg.CalcThis'. The other methods of displaying the 'function help' work great, e.g.:
help eg.CalcThis
doc eg.CalcThis
myclass.CalcThis % and then pressing F1
The live-script is intended for academic purposes in an engineering class. Not everyone in that class has prior experience with the console line or programming in general. It would be nice if the users of the live-script could open it, and if interested, see some more details of how the program works additionaly to the surrounding documentation and comments.
0 Comments
Answers (0)
See Also
Categories
Find more on Class Introspection and Metadata in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!