Can the `help` function parse functions defined in Live Scripts

조회 수: 1 (최근 30일)
Rohan Kadambi
Rohan Kadambi 2022년 8월 17일
댓글: Rohan Kadambi 2023년 8월 31일
When functions are defined in LiveScripts can their header comments be parsed by the help (or similiar) function to generate the help text?
When I explicitly point help to the function path recovered by which I get a message for the Live Script the function is defined in. I've recreated the behaviour here with the "online" Live Script embedded in questions but the output is the same in a local Live Script.
Thanks,
Rohan
which myQuestion
/tmp/Editor_zotvg/LiveEditorEvaluationHelperEeditorId.m (myQuestion) % Local function of LiveEditorEvaluationHelperEeditorId
help myQuestion
myQuestion not found. Use the Help browser search field to search the documentation, or type "help help" for help command options, such as help for methods.
help(which("myQuestion"))
LiveEditorEvaluationHelperEeditorId is a script.
function myQuestion()
%test this is the short help
% This is a longer explanation
disp("Hello World")
end

답변 (1개)

Varun
Varun 2023년 8월 29일
Hi Rohan,
I understand that comments inside a function is not able to be parsed by ‘help’ command on R2022a.
I ran it locally on R2022a and faced the same issue. This issue is fixed in R2023a which is the latest version of MATLAB.
  댓글 수: 1
Rohan Kadambi
Rohan Kadambi 2023년 8월 31일
Howdy,
I still get the same output in 2023a that I got in 2022a. Do you have a working example?
Thanks,
Rohan

댓글을 달려면 로그인하십시오.

카테고리

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

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by