MATLAB Object-Oriented Programming

(Joyce) #1
fcnview
Properties

Listeners

fcneval object
graph

Lm property
UpdateGraph

fcneval

Properties

Events

FofXY
Lm observable
Data

UpdateGraph

Techniques Demonstrated in This Example



  • Naming an event in the class definition

  • Triggering an event by calling notify

  • Enabling a property event via the SetObservable attribute

  • Creating listeners for class-defined events and property PostSet events

  • Defining listener callback functions that accept additional arguments

  • Enabling and disabling listeners


Summary of fcneval Class


The fcneval class evaluates a MATLAB expression over a specified range of two
variables. The fcneval is the source of the data that objects of the fcnview class graph
as a surface. fcneval is the source of the events used in this example. For a listing of the
class definition, see “@fcneval/fcneval.m Class Code” on page 11-64


Techniques for Using Events and Listeners 11-

Free download pdf