divideByZero warning does not show up when dividing by zero.
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
the cyclist
le 29 Juil 2011
The following is in the Release Notes for R2009b. However, explicitly turning on the warning does not enable it for me, in R2011a. I don't see the warning on the screen, or using the lastwarn() function.
Divide By Zero and Log Of Zero Warnings Off By Default
MATLAB no longer displays Divide by zero and Log of zero warnings unless you explicitly enable them with the following commands:
warning on MATLAB:divideByZero
warning on MATLAB:log:LogOfZero
This only affects the display of the warning message on the screen; the warning status is still updated as usual.
3 commentaires
Plus de réponses (2)
the cyclist
le 29 Juil 2011
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
le 29 Juil 2011
Enter the command
warning
It will show you the warnings that exist but which are not set to 'on'.
0 commentaires
Voir également
Catégories
En savoir plus sur Platform and License dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!