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

标签 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

最佳答案

它是这样工作的:

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 的图形版本。

进一步阅读:Add Help for Your Program

关于matlab - 如何在为 "help"命令编写的文本上加粗字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24117451/

相关文章:

c++ - matlab mod转换为c++

matlab - 如何删除矩阵中的特定行

matlab - 如何保存音频WAV文件而不进行数据裁剪?

matlab - 将电影文件拆分为音频和视频Psychtoolbox

java - 打开太多图形时如何避免 MATLAB 崩溃?

matlab - 从数组中删除非唯一行

c++ - 选择默认的 gcc/g++ 编译器

c - 如何使用 C 中的函数生成随机数数组

matlab - 使用算法的 Matlab 实现进行时间比较是否有问题?

python - 将 Python .npz 保存为 MATLAB .mat 文件