Info

This question is closed. Reopen it to edit or answer.

Integral2 weird phenomenon (NEED HELP)

1 view (last 30 days)
TheBestTreeInTheForest
TheBestTreeInTheForest on 29 Apr 2015
Closed: MATLAB Answer Bot on 20 Aug 2021
So, I have encountered a weird phenomenon when using the integral2 function.
I call integral2 in the following manner:
ymax=0.03648*10^9;
xmin= 1.0949;
w=2000;
z=1.0631;
fun=@(x,y) fun1(x,y,w,z) * fun2(x) * x^4;
ans=integral2(fun,xmin,inf,0,ymax);
Now what happens is that for example I know the result of this should be 0.9, instead of getting that I get a value equal to 0.9*ymax.
I checked all the intermediate values I could and I get the right values for all of them but at some point I guess it multiplies the final answer by ymax and I can't figure out why. Any ideas would be much appreciated.
Thanks!

Answers (0)

Tags

Products

Community Treasure Hunt

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

Start Hunting!