matlab event notify recursive

来源:互联网 发布:java的编译命令是哪个 编辑:程序博客网 时间:2024/05/16 09:38
classdef testClass < handle    events        testevent    end    methods        function obj = testClass            lh = obj.addlistener('testevent', @obj.respond);            lh.Recursive = true;        end        function raise(obj)            notify(obj,'testevent');        end        function respond(obj, varargin)            fprintf('Responded!\n');            obj.raise();        end    endend
0 0