How to suppress warnings when running Simulink simulation programmatically?
조회 수: 51 (최근 30일)
이전 댓글 표시
I am running a Simulink simulation from my_sim.m MATLAB file:
...
sim('rocket_sim');
fprintf('Finished. \n');
...
I am getting huge number of warnings which flood the console output.
How can I suppress the warnings? All I want to see is the "Finished." message.
댓글 수: 0
채택된 답변
Rik
2020년 5월 22일
Unless Simulink is not playing nice, this should work:
...
w=warning('off','all');
sim('rocket_sim');
warning(w);
fprintf('Finished. \n');
...
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!