> What are you trying to do with the function that causes the error message ?
>
> Best wishes
> Torsten.
I just want to integrate "1/x" between 0,1. When "x=0" i got error which is "Warning: Infinite or Not-a-Number value encountered." i gave Tolerance (like "RelTol" and "AbsTol") nothing changed.
Than use this;
[int_2, err]=quadgk(fun,inf,1,'RelTol',1e-8,'AbsTol',1e-12,'MaxIntervalCount',1024)
at intervals, "inf" is "0" here. cause like i said before when x=0 function is infinite. so i need to have good approximation to "0" and it has to stop before x hits to "0" to avoid being infinite. But the output "err" gave me 3.7. And said i need to more iteration for interval counting.. The warning is like below;
"Warning: Reached the limit on the maximum number of intervals in use. Approximate bound on
error is 3.7e+00. The integral may not exist, or it may be difficult to approximate
numerically. Increase MaxIntervalCount to 1504 to enable QUADGK to continue for another
iteration."
How do i solve this?
Thanks for your help
Oguzhan