Show older comments
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?
Accepted Answer
More Answers (1)
Paulo Silva
on 8 Sep 2011
0 votes
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 Comments
x
on 8 Sep 2011
Walter Roberson
on 8 Sep 2011
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
on 8 Sep 2011
Walter Roberson
on 8 Sep 2011
What would you _like_ the result to come out as if the determinant turns out to be negative ?
Categories
Find more on Number Theory in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!