remove error message in command window
42 次查看(过去 30 天)
显示 更早的评论
How to remove error message in command window matlab if we don't want the message to appear?
Is this possible?
note: I'm using m-file
Thanks before..
1 个评论
Stephen23
2017-5-11
编辑:Stephen23
2017-5-11
Once the error message has been displayed in the command window there is not much that can be done about it, other than clearing the whole command window using clc. It might be easier to prevent it getting displayed in the first place: see the documentation for catch.
采纳的回答
Jan
2017-5-11
error message are very important. Because they should never be ignored, it is a bad idea to remove them. A much better idea is to either avoid them, by considering the reasons, or to handle them in a TRY/CATCH block.
2 个评论
Image Analyst
2017-5-12
Are you sure it wasn't a warning (orange type instead of red)? Otherwise your program would not have finished (unless the error-causing code was in a try block).
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Entering Commands 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!