Divide by Zero
显示 更早的评论
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 个)
Jan
2012-6-26
For stopping on division by zero see:
warning on MATLAB:divideByZero
dbstop if warning MATLAB:divideByZero
and
dbstop if naninf
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!