- “Events” on page 30-7
Classes
Create help text for classes by including comments on lines immediately after the
classdef statement in a file. For example, create a file named myClass.m, as shown.
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
end
methods
function obj = myClass
end
function doThis(obj)
end
function doThat(obj)
end
end
end
Lists and descriptions of the properties and methods in the initial comment block are
optional. If you include comment lines containing the class name followed by
Properties or Methods and a colon (:), then MATLAB creates hyperlinks to the help for
the properties or methods.
View the help text for the class in the Command Window using the help command.
help myClass
30 Custom Help and Documentation