How to avoid inf
5 ビュー (過去 30 日間)
古いコメントを表示
Dear all,
I take the log of difference between two standard normal CDFs,
that is
D=log(normcdf()-normcdf())
but in most of the cases D=inf. Is there a way to avoid having inf?
Thanks in advance,
0 件のコメント
採用された回答
Udit Gupta
2014 年 5 月 29 日
Log of zero is -Inf. To avoid that add a small number before taking the log. For example -
D = log(normcdf() - normcdf() + 0.00001)
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Parallel for-Loops (parfor) についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!