Clear Filters
Clear Filters

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.

2 views (last 30 days)
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 Comments
DGM
DGM on 7 Mar 2022
Edited: DGM on 7 Mar 2022
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.

Sign in to comment.

Answers (1)

Nihal
Nihal on 24 Jan 2024
Edited: Walter Roberson on 24 Jan 2024
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 Comment
Walter Roberson
Walter Roberson on 24 Jan 2024
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.

Sign in to comment.

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!