I am using a loop to estimate the parameters in a formula. However, when using the syntax 'integral' to numerically integrate sin(x)/x from 0 to inf, Matlab always gives me a warning and a wrong answer. The exact result of this integral is pi/2 if I use the syntax 'int'. Unfortunately, for estimation purpose, numerical integration saves me a great deal of time, and I can only use 'integral' rather than 'int'. My formula is pretty similar to the problem of integrating sin(x)/x. Can anyone help me correct the result given by Matlab 'integral'? Many thanks!
MATLAB: Numerical integral of sin(x)/x from 0 to inf
integralsin(x)/x
Best Answer