matrix multiplication error
2 ビュー (過去 30 日間)
古いコメントを表示
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
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
2012 年 3 月 7 日
You could get NaN if you multiply infinity by 0. Once you have one NaN, it very often "pollutes" all the other calculations.
3 件のコメント
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
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 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!