如何在为"help"命令编写的文本上加粗

Fra*_*zzi 4 matlab

如果您输入help sin,您会注意到该sin单词是粗体.我怎样才能在自己的功能中实现这一目标?

%
% If I write things here, they will compare as a result of "help" command
% How to make something bold?
%
function result = myfunction(...)

% ...

end
Run Code Online (Sandbox Code Playgroud)

tim*_*geb 5

它的工作方式如下:

function testfun()
    % this is the testfun help text
end
Run Code Online (Sandbox Code Playgroud)

发行help testfun会得到你

这是testfun帮助文本

但是当你写TESTFUN所有大写的时候,即

function testfun()
    % this is the TESTFUN help text
end
Run Code Online (Sandbox Code Playgroud)

help testfun 会显示

这是testfun帮助文本

请注意,这仅适用于函数的名称,因此将"text"更改为"TEXT"不会使单词文本变为粗体.此外,这似乎只适用于Matlab的图形版本.

进一步阅读:为您的程序添加帮助