Clear Filters
Clear Filters

remove error message in command window

36 views (last 30 days)
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 Comment
Stephen23
Stephen23 on 11 May 2017
Edited: Stephen23 on 11 May 2017
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.

Sign in to comment.

Accepted Answer

Jan
Jan on 11 May 2017
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 Comments
Yuli Hartini
Yuli Hartini on 12 May 2017
I just want to remove for one script on m-file program..
Because the program already succes to run..
But for some condition, the error message was appear.
Image Analyst
Image Analyst on 12 May 2017
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).

Sign in to comment.

More Answers (0)

Categories

Find more on Simulink Functions in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!