Integrating a truncated normpdf
古いコメントを表示
I have a function multiplied by a normal distribution that I can integrate in the following manner:
f2 = @(theta) f1(theta)*normpdf(theta)
ans = integral(f2,-k,k)
and everything is okay and great. However, I need normpdf(theta) to be truncated from -k to k. Truncate() only seems to work for makedist() which would get rid of the anonymous function I need for the integral. The closest solution I can find is here: https://www.mathworks.com/matlabcentral/newsreader/view_thread/100921 but the link to the tutorial is broken and I'm not sure if mle is the answer to my problem...
Thank you in advance for any advice
4 件のコメント
Star Strider
2017 年 4 月 11 日
f1 = ?
Christina
2017 年 4 月 11 日
Torsten
2017 年 4 月 12 日
Why don't you insert the explicit formula for the truncated normal from -k to k ?
https://en.wikipedia.org/wiki/Truncated_normal_distribution
Best wishes
Torsten.
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Mathematics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!