Can the `help` function parse functions defined in Live Scripts
1 次查看(过去 30 天)
显示 更早的评论
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
help myQuestion
help(which("myQuestion"))
function myQuestion()
%test this is the short help
% This is a longer explanation
disp("Hello World")
end
0 个评论
回答(1 个)
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!