警告発生時,try/catchのような例外処理
이전 댓글 표시
try/catch~ ではエラー(プログラム停止相当)に対して,例外処理ができますが, 同様に警告(プログラム続行相当)に対して例外処理を行いたいときはどうすればよいのでしょうか.//(例えば,警告発生時,プログラムを停止する.)
댓글 수: 1
Hirokazu Tanaka
2018년 10월 13일
勝手ながら sample.m の中身を下記に転記します。
result = 0;
%result = 2としたい
try
warning('warnig!!') %error('msg')ではない
result = 1
catch
result = 2
end
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 エラー処理에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!