如果您输入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
最佳答案
它是这样工作的:
function testfun()
% this is the testfun help text
end
发出 help testfun
会得到你
this is the testfun help text
但是当你用大写字母编写 TESTFUN
时,即
function testfun()
% this is the TESTFUN help text
end
help testfun
会显示
this is the testfun help text
请注意,这仅适用于函数名称,因此将“text”更改为“TEXT”不会使单词 text 变为粗体。此外,这似乎只适用于 Matlab 的图形版本。
关于matlab - 如何在为 "help"命令编写的文本上加粗字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24117451/