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.

댓글 수: 1

ferda sonmez
ferda sonmez 2019년 3월 21일
Hi,
I have thw saame issue. My matrixes do not have NaN values, however, multiplication of the matrixes has NaN values? Is this situation is acceptable or am I missing something?

댓글을 달려면 로그인하십시오.

 채택된 답변

Walter Roberson
Walter Roberson 2012년 3월 7일

0 개 추천

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

댓글 수: 3

Fred
Fred 2012년 3월 7일
i'm guessing probably i am not suppose to have infinity but my matrix is 24x2100 size so should i check all elements by one by if it they are infinity or not?
is there any other easy way to do that?
Walter Roberson
Walter Roberson 2012년 3월 7일
any(isfinite(Matrix(:)))
will be true if there are any infinite values.
Be sure to also check
any(isnan(Matrix(:)))
which will be true if there are any NaN values.
Imola Fodor
Imola Fodor 2021년 8월 6일
hi, I dont have infinite values - checked with any(isinf(Matrix(:))).. no Nan-s either, the columns/rows match, and i get Nan-s on the output..any firther suggestion? thank you

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

질문:

2012년 3월 7일

댓글:

2021년 8월 6일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by