Observer pattern

An example of observer pattern

You are now following this Submission

The observer pattern allows to decouple the GUI elements (control and view) from the data model. All views are automatically synchronized through notify()/update()

Example:
iw1 = interval_window();
iw2 = interval_window_flow();
iv = interval_view();

i1 = interval(2,8,6);

i1.attach_observer(iw1);
i1.attach_observer(iw2);
i1.attach_observer(iv);

Cite As

Arne Jenssen (2026). Observer pattern (https://www.mathworks.com/matlabcentral/fileexchange/17843-observer-pattern), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Software Development Tools in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0