| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Statistics Toolbox |
| Contents | Index |
| Learn more about Statistics Toolbox |
Add listener for event
el = addlistener(hsource, 'eventname', callback)
el = addlistener(hsource, property, 'eventname', callback)
el = addlistener(hsource, 'eventname', callback) creates a listener for the event named eventname, the source of which is handle object hsource. If hsource is an array of source handles, the listener responds to the named event on any handle in the array. callback is a function handle that is invoked when the event is triggered.
el = addlistener(hsource, property, 'eventname', callback) adds a listener for a property event. eventname must be one of the strings 'PreGet', 'PostGet', 'PreSet', and 'PostSet'. property must be either a property name or cell array of property names, or a meta.property or array of meta.property. The properties must belong to the class of hsource. If hsource is scalar, property can include dynamic properties.
For all forms, addlistener returns an event.listener. To remove a listener, delete the object returned by addlistener. For example, delete(el) calls the handle class delete method to remove the listener and delete it from the workspace.
delete, dynamicprops, event.listener, events, meta.property, notify, qrandstream, reset
![]() | addlevels (categorical) | AIC property (gmdistribution) | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |