When using the system to run the executable, how to close some intermediate result windows? The executable needs several inputs. After each input, there will be a window.
이전 댓글 표시
Hi,
I want to use matlab to access an executable (created by C). For that executable, it needs several inputs. After each input, there will be a figure window popping out (some result). Is there any way to close those figure windows in script? In the end, I want to put a code to run that executable rather than do it manually.
Appreciated,
Corey
댓글 수: 2
I'm assuming these windows are generated by the external executable and not by MATLAB.
Depends what your environment is. In linux, if you can identify the window with wmctrl, you should be able to close it.
I'm pretty sure it's going to boil down to an external solution either way.
Walter Roberson
2022년 3월 7일
In MacOS you would probably end up using AppleScript, or the newer Shortcuts.
답변 (1개)
Hornett
2024년 1월 24일
편집: Walter Roberson
2024년 1월 24일
0 개 추천
Hi,
I understand that you want to close multiple figure windows open in MATLAB and would like to close them all at once, you may use the command close all. This will conveniently close all open figure windows. Alternatively, if you prefer to close a specific window, you can pass its handle to the close function. For a more comprehensive understanding and additional options, please feel free to consult the MATLAB documentation on figure handling : https://www.mathworks.com/help/matlab/ref/close.html
I hope this helps!
댓글 수: 1
Walter Roberson
2024년 1월 24일
Unfortunately it is not clear where the figure windows are being generated:
- traditional figure windows
- ui figure windows (app designer)
- generated by an external application
My reading of the question suggests that they are being generated by an external application.
카테고리
도움말 센터 및 File Exchange에서 Graphics Performance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!