dos % A comment (not help text)
end
end
View the help in the Command Window using the help command. Specify both the class
name and enumeration member, separated by a dot.
help myEnumeration.uno
uno - First enumeration
help myEnumeration.dos
dos - Second enumeration
The description for dos has several
lines of text.
Events
Like properties and enumerations, there are two ways to create help for events:
- Insert comment lines above the event definition. Use this approach for multiline help
text. - Add a single-line comment next to the event definition.
Comments above the definition have precedence over a comment next to the definition.
For example, create a class in a file named hasEvents.m.
classdef hasEvents < handle
events
Alpha % First event
% Beta - Second event
% Additional text about second event.
Beta % (not help text)
end
methods
function fireEventAlpha(h)
notify(h,'Alpha')
end
function fireEventBeta(h)
notify(h,'Beta')
Create Help for Classes