No F1-help for class object
조회 수: 3 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Class Introspection and Metadata에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!