Borrar filtros
Borrar filtros

why does windows command shell close?

11 visualizaciones (últimos 30 días)
William Rose
William Rose el 20 de En. de 2018
Editada: Greg el 21 de En. de 2018
in Matlab 2017a on Windows 10, I have compiled my Matlab script. I made sure the box "Do not display the Windows Command Shell (console) for execution" was NOT checked. The uncompiled program runs fine and prints results to the Matlab command window. The compiled program runs and the console window is open while the program runs, but as soon as the program finishes, the console window closes. How do I prevent he console window from closing when program finishes?

Respuesta aceptada

Greg
Greg el 21 de En. de 2018
Editada: Greg el 21 de En. de 2018
The task is finished, so the process ends. Ending the process closes the command prompt.
You can launch a Windows command prompt and call the executable from there.
Or you can add something to the end of your code to prevent completion. One idea is:
if isdeployed % Optional, use if you want the non-deployed version to exit immediately
input('Press enter to finish and close');
end

Más respuestas (0)

Categorías

Más información sobre MATLAB Compiler 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