callback code for push_button in matlab GUI to stop fast iterations due to FOR loops in main program
7 ビュー (過去 30 日間)
古いコメントを表示
Keshav Dev Singh
2014 年 3 月 10 日
コメント済み: Keshav Dev Singh
2014 年 3 月 11 日
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 で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!