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). Related SolutionsMATLAB: Correlation between two row matrices Like that, each value of "a" is correlated to each value of "b", but applying the formula of the correlation, the correlation of two single numbers is NaN. To compute the correlation correctly, traspose the input vectorsresult = corr(a', b'); MATLAB: Does a cell vector contains only NaN cisnan = @(C)all(cellfun(@(x)all(isnan(x(:))),C));cisnan(your_cell) Related QuestionIs this a bug in double precision data typeSubtract two matrices each with NaN values in different cellsSame matrix but not equal problemReplace numbers in a matrix that are surrounded in 8-directions by NaNs to NaNsConstructing an if statement when a column contains only one data point and the rest are NaNsCount number of values between NaNFind the last NaN value in cell array and compare it with the next column
Best Answer