matlab gui中如何利用一个按钮通过改变全局变量终止另一个按钮中的循环
我是这样写的,为什么实现不了?functionyxfxjmsj_OpeningFcn(hObject,eventdata,handles,varargin)globalz...
我是这样写的,为什么实现不了?
function yxfxjmsj_OpeningFcn(hObject, eventdata, handles, varargin)
global zanti
function run_Callback(hObject, eventdata, handles)
global zanti
zanti=1;
for i=1:length(fileNames)
if zanti==1;
……(主程序无关就不贴了)
else if zanti==0;
break;
end
end
end
function stop_Callback(hObject, eventdata, handles)
global zanti
zanti==0; 展开
function yxfxjmsj_OpeningFcn(hObject, eventdata, handles, varargin)
global zanti
function run_Callback(hObject, eventdata, handles)
global zanti
zanti=1;
for i=1:length(fileNames)
if zanti==1;
……(主程序无关就不贴了)
else if zanti==0;
break;
end
end
end
function stop_Callback(hObject, eventdata, handles)
global zanti
zanti==0; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询