MATLAB: NaN vs. Inf

infnan

Why is
1/0 = Inf
but
[1,0]./[1,0] = [1 NaN]
shouldn't it be [1 Inf]?

Best Answer

1/0 is infinity, but 0/0 is not infinity nor is it zero - it's just undefined (NaN).