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,

 採用された回答

Udit Gupta
Udit Gupta 2014 年 5 月 29 日

0 投票

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 件)

カテゴリ

ヘルプ センター および File ExchangeLog Plots についてさらに検索

タグ

質問済み:

2014 年 5 月 29 日

回答済み:

2014 年 5 月 29 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by