remove error message in command window

조회 수: 40 (최근 30일)
Yuli Hartini
Yuli Hartini 2017년 5월 11일
댓글: Image Analyst 2017년 5월 12일
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
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
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
Yuli Hartini
Yuli Hartini 2017년 5월 12일
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 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 CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by