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!