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개)

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 CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by