callback code for push_button in matlab GUI to stop fast iterations due to FOR loops in main program
1 次查看(过去 30 天)
显示 更早的评论
I want to interrupt or break the program iterations (due to FOR loops in main program) in a GUI using a push_button. Can any one give me the precise pushbutton_callback code for the same. Your help will be greatly appreciated.
Thanks, K.D.Singh
0 个评论
采纳的回答
Dishant Arora
2014-3-10
编辑:Dishant Arora
2014-3-10
function pushbutton_callback(hObject, eventdata, handles)
setappdata(0 , 'Flag', 0);
while your other script might be like this
setappdata(0 , 'Flag' , 1);
while(1)
sprintf('in loop')
Flag=getappdata(0,'Flag');
if Flag == 0
break;
end
drawnow
end
9 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Mobile Fundamentals 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!