Divide by Zero
Mostrar comentarios más antiguos
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 comentario
D G
el 26 de Jun. de 2012
Respuesta aceptada
Más respuestas (1)
Jan
el 26 de Jun. de 2012
For stopping on division by zero see:
warning on MATLAB:divideByZero
dbstop if warning MATLAB:divideByZero
and
dbstop if naninf
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!