How to resume the program runing after a button press ?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi !
I have a program script that opens a GUI. the user should press one of many buttons. and the value of a global variable will change depending on which button was pressed. then in the scribt that value will be used. the process will be repeated many times.
what happen now is after pressing the button I have to close the GUI for the rest of the program to run. so, I need a way to open the GUI once and for the rest of the program to run once one button is pressed.
the thing is I am so beginner in the whole GUI thing so I may need more detail or what exact function to use and where
thank you.
댓글 수: 5
Guillaume
2017년 8월 22일
편집: Guillaume
2017년 8월 22일
@Nora,
There certainly are better mechanisms than global variables to pass data between programs.
With regards to your question, your design is not entirely clear. Showing us the code would help clarify. It sounds like you have two pieces of code that you want to run in parallel, a script and a GUI. If that is the case, then that is not possible in matlab. You would indeed need to close the GUI to continue the script. To achieve something similar to what you want you'll need to move the script code within the GUI code.
답변 (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!