MATLAB: Matrix multiplication error

multiplication

Hi all,
i'm doing matrix multiply and array multiply but it gives me NaN matrix what can be the reason for that? this is the equation a=xv*eye(n).*xv
thanks in advance.

Best Answer

You could get NaN if you multiply infinity by 0. Once you have one NaN, it very often "pollutes" all the other calculations.