how to change variable inside a function from a gui

1 回表示 (過去 30 日間)
Kobi
Kobi 2013 年 12 月 10 日
回答済み: Walter Roberson 2013 年 12 月 10 日
i need to change a value inside a function from gui. how can i do that?
  1 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 12 月 10 日
What does that mean?

サインインしてコメントする。

回答 (1 件)

Walter Roberson
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

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by