Working with numbers smaller tha 10^-308
5 次查看(过去 30 天)
显示 更早的评论
Hi,
I would like to know if it is possible to use Matlab for very small numbers (smaller than 10^-308 ). It's very important for my application "statistical genetics". in this field, somes probabilities are smaller than 10^-500.
Thank you
4 个评论
John Doe
2013-5-9
Ok, then I see where you get the number from, but if you are ending up with a probability that low, it is literally impossible for it to happen. Isn't OK to just let it be equal to 0?
I don't mean to be rude or condescending, I just don't get how it would make sense to keep working with numbers that low.
Anyhow, I hope someone can provide an answer for you, and good luck =)
回答(2 个)
Sean de Wolski
2013-5-9
编辑:Sean de Wolski
2013-5-9
3 个评论
Sean de Wolski
2013-5-10
That's because you're doing the computation as a double and then converting it to vpa(). Convert it to vpa before doing the computation:
for i=400:-1:1
tab(i)=vpa(0.1);
end
v = (prod(tab))
Peter Perkins
2013-5-11
Quite often in statistics when one has very small probabilities, one works on the log scale. That's why one typically maximizes the LOG-likelihood, and not the likelihood.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Numbers and Precision 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!