e = events(...)
events('classname') displays the names of the public events for the MATLAB® class classname, including events inherited from superclasses.
e = events(...) returns the event names in a cell array of strings.
An event is public when the value of its ListenAccess attribute is public and its Hidden attribute value is false (default values for both attributes). See Event Attributes for a complete list of attributes.
events is also a MATLAB class-definition keyword. See classdef for more information on class definition keywords.
Get the names of the public events for the handle class:
events('handle') Events for class handle: ObjectBeingDestroyed