I've tried it many times but the result of errors, can you help me give advice my code
function togglebutton1_Callback(hObject, eventdata, handles)t=timer('TimerFcn',(@axes1.handles),'BusyMode','queue','executionmode','singleShot','period',0.5);button_state = get(hObject,'Value')handles.togglebutton1=1if button_state == get(hObject,'Max') while handles.togglebutton1==1 start(t) camorbit(1,0,'data',[0 0 1]) drawnow endelseif button_state == get(hObject,'Min') stop (t)end
The above code can run but can not be stopped if the return is pressed the button and remove the error message such as this
??? Error while evaluating TimerFcn for timer 'timer-5' Undefined function or method 'desain.handles' for input arguments of type 'timer'.
??? Error while evaluating TimerFcn for timer 'timer-5' Undefined function or method 'desain.handles' for input arguments of type 'timer'.
please help thanks
Best Answer