MATLAB 自定义帮助文本与代码提示:全面指南
1. 自定义帮助文本
在 MATLAB 中,你可以为类、方法、属性、枚举和事件添加自定义帮助文本,这些文本会在 doc 和 help 命令的显示中呈现。 doc 命令会在生成的 HTML 页面顶部显示帮助文本,而 help 命令则在命令窗口中显示。
1.1 类的帮助文本
要为类创建帮助文本,可在 classdef 语句后的行中添加注释。例如,创建一个名为 myClass.m 的文件:
classdef myClass
% myClass Summary of myClass
% This is the first line of the description of myClass.
% Descriptions can include multiple lines of text.
%
% myClass Properties:
% a - Description of a
% b - Description of b
%
% myClass Methods:
% doThis - Description of doThis
% doThat - Description of doThat
properties
a
b
MATLAB自定义帮助与代码提示指南
超级会员免费看
订阅专栏 解锁全文
1285

被折叠的 条评论
为什么被折叠?



