Borrar filtros
Borrar filtros

how to capture texts in the command window?

22 visualizaciones (últimos 30 días)
Feng
Feng el 28 de Jun. de 2012
I have a gui application. some error messages appear in the command window sometime when i am not around. i would like to be able to capture the messages to a text file, something like an error log. can anyone please let me know how to do that? thank

Respuestas (2)

Walter Roberson
Walter Roberson el 28 de Jun. de 2012
Editada: Walter Roberson el 28 de Jun. de 2012
You might be able to use diary()
Also in some cases evalc() is suitable.

Jan
Jan el 28 de Jun. de 2012
I enclose the concern parts of the program in TRY-CATCH blocks and use a dedicated function, which writes to the command window and a log file.
Another idea: The function FEX: CmdWinTool allows to get the text written to the command window.

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