How can I reopen or re-run a GUI figure once I closed the window?

5 visualizaciones (últimos 30 días)
Fernando Venegas
Fernando Venegas el 5 de Oct. de 2016
Comentada: Jan el 9 de Jul. de 2018
Hello,
I created a very simple GUI using GUIDE, every time I want to run it I go to the generated .m file and press the “Run” button in the editor. The problem is that if I close the GUI window, I am not able to reopen it. When I press “Run” again, I can see the right command on the “command window” but nothing happens, the GUI is not launched.
The only solution I have so far is to close MATLAB completely and then open my files again, but this is of course very annoying.
Do you have any suggestions?
Thanks for the help!
  1 comentario
Adam
Adam el 7 de Oct. de 2016
Editada: Adam el 7 de Oct. de 2016
What happens if you instead run it from command line as e.g.
myGui = GUIName
where GUIName is obviously whatever you named your GUI.
Do you get an output on command line showing that myGUI is a figure? It is possible it is opening the figure off-screen though why it would do this only after closing it rather than always would be a mystery.

Iniciar sesión para comentar.

Respuestas (1)

Marc Jakobi
Marc Jakobi el 5 de Oct. de 2016
This is not normal behaviour. It sounds like there may be an infinite loop somewhere in your code. Does it say "busy" in the bottom left corner of the command window? If so, press CTRL+C to cancel any running code execution.
  4 comentarios
Shae Morgan
Shae Morgan el 9 de Jul. de 2018
I have the same issue here... any ideas or help on this?
Jan
Jan el 9 de Jul. de 2018
@Shae Morgan: Please open a new thread and explain the problem again. How do you close the figure? What do you observe, when you set a breakpoint in the OpeningFcn and start the M-file?

Iniciar sesión para comentar.

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by