gui problem Error while evaluating TimerFcn for timer 'timer-160'

1 次查看(过去 30 天)

if true

   function frameshow_Callback(hObject, eventdata, handles)
   global t  
   global t1
t1=timer('TimerFcn',{@timerCallback1,handles},'ExecutionMode', 'fixedDelay','Period', 0.1);
guidata(hObject,handles);
stop(t);
start(t1);
if true
   function timerCallback1(hObject, eventdata, handles)
    global vid
    global t1
    global frame
      if (vid==-1)
      msgbox('show!');
      stop(t1);
      return;
      end
     axes(handles.axesshow);
      frame=getsnapshot(vid);
     imshow(frame);
       end
if true
  %function numberdetect_Callback(hObject, eventdata, handles)
global t
global t1
t=timer('TimerFcn',{@timerCallback3,handles},'ExecutionMode', 'fixedDelay','Period', 0.1);
guidata(hObject,handles);
stop(t1);
start(t);
function timerCallback3(hObject, eventdata, handles)
global vid
global t
global frame
global c
if (vid==-1)
  msgbox('first show!');
  stop(t);
  return;
end
frame=getsnapshot(vid);
imagen = rgb2gray(frame);
end
i want to use two timer to show the camera image
but i start the function sometimes shows :Error while evaluating TimerFcn for timer 'timer-160' 
but i have stop the timer than use another timer.
i recently tag error so i restart made one problem

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 迁移使用 GUIDE 创建的 App 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!