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 comentarios

DGM
DGM el 7 de Mzo. de 2022
Editada: DGM el 7 de Mzo. de 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.
In MacOS you would probably end up using AppleScript, or the newer Shortcuts.

Iniciar sesión para comentar.

Respuestas (1)

Hornett
Hornett el 24 de En. de 2024
Editada: Walter Roberson el 24 de En. de 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 comentario

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.

Iniciar sesión para comentar.

Categorías

Más información sobre Graphics Performance en Centro de ayuda y File Exchange.

Productos

Versión

R2020b

Etiquetas

Preguntada:

el 7 de Mzo. de 2022

Comentada:

el 24 de En. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by