![]() |
MatlabGUI中的timer为什么无法停止?
原程序如下:
function start_Callback(hObject, eventdata, handles) % hObject handle to start (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) guidata(handles); timerID=timer('timerFcn',{@timerCallback},'ExecutionMode','fixedDelay','Period',10.0); stoprun=get(hObject,'Value'); if stoprun start(timerID); else alltimers = timerfind; if length(alltimers)>0 stop(timerID); delete(alltimers); end end 其中timerCallback为数据采集的程序,start按钮为toggle按钮。在程序运行时,点击start按钮无法响应。为什么? |
所有时间均为北京时间。现在的时间是 11:18。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.