how to capture texts in the command window?
14 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(2 个)
Walter Roberson
2012-6-28
编辑:Walter Roberson
2012-6-28
You might be able to use diary()
Also in some cases evalc() is suitable.
0 个评论
Jan
2012-6-28
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!