I was testing a timer in a large program written in GUIDE and I came across these strange results.
function checkfordone_openningFcn(hObject, eventdata, handles, varargin)…handles.t = timer(‘TimerFcn’,@IsDataReady,’ExecutionMode’,’fixedRate’,’Period,4);start(handles.t)function IsDataReady(timerObject, eventdata) fHandles = findobj(‘type’,’figure’,’tag’,’figure1’)end
The findobj command in the timer function callback, IsDataReady, returns a valid handle to figure1 the first time it is called. After that it only returns null.
Best Answer