NAN+inf
古いコメントを表示
in my paper i need to calculate exp()...here in my code i got exp(4096) but due to this i am getting NAN+inf in all larger value areas..what to do for this?whether tis indicates any error or this NAN+inf for some values are acceptable?
採用された回答
その他の回答 (1 件)
Paulo Silva
2011 年 9 月 8 日
0 投票
Can you please tell my why are you trying to get a result from exp(4096)? you do know that the result would be a very huge number, MATLAB can't find it.
4 件のコメント
x
2011 年 9 月 8 日
Walter Roberson
2011 年 9 月 8 日
If the det() of the covariance matrix is negative, then the sqrt() of it will be complex, which you then multiply by infinity. In particular if the real part of the sqrt() came out as 0 but the complex part came out positive, you would have 0*infinity + positive_number*infinity*sqrt(-1) . 0*infinity is NaN, but the second part would come out as +infinity*sqrt(-1), for a net result represented as NaN +infinity*i
x
2011 年 9 月 8 日
Walter Roberson
2011 年 9 月 8 日
What would you _like_ the result to come out as if the determinant turns out to be negative ?
カテゴリ
ヘルプ センター および File Exchange で Number Theory についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!