divideByZero warning does not show up when dividing by zero.
古いコメントを表示
I am working with MATLAB 2011a, and I do not see the MATLAB:divideByZero warning appearing when I do divide by zero, though I set the divideByZero warning on with:
warning on MATLAB:divideByZero
I tried it with MATLAB 2009, and the warning appeared in this release. Unfortunately, I need to have it working on 2011a.
How can I get this warning to appear?
5 件のコメント
Daniel Shub
2011 年 7 月 29 日
Loren's blog says that in r2006b 1/0 should give a warning
http://blogs.mathworks.com/loren/2006/10/18/controlling-warning-messages-and-state/
in r2011a it does not.
Paulo Silva
2011 年 7 月 29 日
works just fine on MATLAB 2008b
the cyclist
2011 年 7 月 29 日
Sorry, accidentally deleted my own comment! Here it is again, out of order with yours!
Can you give a small example of code where you would expect this warning to show up , but it doesn't? [I know that sounds trivial, but for example 1./0 will not give such a warning; it will simply report "Inf" as an answer.]
Paulo Silva
2011 年 7 月 29 日
by default MATLAB doesn't give warning for divisions by zero
Adrien
2011 年 7 月 29 日
採用された回答
その他の回答 (2 件)
the cyclist
2011 年 7 月 29 日
0 投票
I have R2010a, R2010b, and R2011a on my machine. None of them give a warning for 1/0. If 2009 gave the warning, looks like maybe the behavior changed at 2010a? Could scan the release notes.
Walter Roberson
2011 年 7 月 29 日
Enter the command
warning
It will show you the warnings that exist but which are not set to 'on'.
カテゴリ
ヘルプ センター および File Exchange で Platform and License についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!