how to change variable inside a function from a gui
1 次查看(过去 30 天)
显示 更早的评论
i need to change a value inside a function from gui. how can i do that?
回答(1 个)
Walter Roberson
2013-12-10
There are limited circumstances under which a GUI can force a variable in a function to change. It is easier if the GUI makes the new value available and the function asks for the current value.
while true
drawnow();
should_quit = get(handles.QuitButton, 'Value');
if should_quit; break; end
....
end
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!