Divide by Zero
Afficher commentaires plus anciens
I am wondering, why does MATLAB give infinity for the calculation 1 / 0?
Shouldn't this throw an error, return NaN, or be a complex infinity?
Just looking for some reasoning for this invalid calculation.
Thanks!
1 commentaire
D G
le 26 Juin 2012
Réponse acceptée
Plus de réponses (1)
Jan
le 26 Juin 2012
For stopping on division by zero see:
warning on MATLAB:divideByZero
dbstop if warning MATLAB:divideByZero
and
dbstop if naninf
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!