Problem with integration of Normal PDF

1 回表示 (過去 30 日間)
Caio
Caio 2015 年 3 月 8 日
回答済み: Torsten 2015 年 3 月 9 日
When I expand the limits of integration, the result goes to zero, which does not make any sense, since the function is always positive. Here is an example of the output I am getting:
>> integral(@(x)normpdf(x),-10^1,10)
ans =
1.000000000000000
>> integral(@(x)normpdf(x),-10^100,10)
ans =
0
If someone knows a proper way to integrate the normpdf function please let me know.
Thanks!

採用された回答

Torsten
Torsten 2015 年 3 月 9 日
Use the "Waypoints" option, i.e. distribute points in the region where the mass of your function is located (in this case around x=0).
Best wishes
Torsten.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumerical Integration and Differentiation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by