Integration problem, getting wrong answer in matlab
古いコメントを表示
Good morning I have an integration that I need to compute, I used MATLAB but I did not get the right answer.
This is the integral:
exp(-(t-1)^2/(σ^2)) dt
from -Inf to Inf. I am getting that it equals zero which is impossible, can any one help me?
Thank you in advance
採用された回答
その他の回答 (1 件)
Giuseppe Infantino
2020 年 1 月 8 日
Guys, I have incredible integration issues, see below:
I need to calculate a difficult integral and I didn't obtain good results, so I try a very simple integral in order to try to understand the problem and as you can see from the code below, Matlab provides a wrong results, beacuse the correct results is (-log(1-x)) and not (-log(x-1)), and for these reasons I'm having lots of troubles in my computations. Honestly, I have no idea about this problem, I even doubts about my capabilty of calculating such a simple integral so that I verify with WolphramAlpha that provides the correct results!
Could someone help me? Thank you very much and sorry for my english.
>>int (1./(1-x), x)
ans =
-log(x-1)
カテゴリ
ヘルプ センター および File Exchange で Function Creation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!