Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
|
![]() |
#1 |
初级会员
注册日期: 2011-03-18
帖子: 3
声望力: 0 ![]() |
![]()
在GUI中按一个键让while循环停止怎么做比较好? 有没有常见错误和注意事项?
这样虽然可以但是好像不太好 大家是如何做的? while(1) ........................ if kaiguan == 1 pause(3); break; end; end % --- Executes on button press in stop. function stop_Callback(hObject, eventdata, handles) % hObject handle to stop (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) global kaiguan; kaiguan = 1; pause(2); clear all; close(gcf); |
![]() |
![]() |