I have an interpolation function generated with "interp2":
G=@(x,y)interp2(xData,yData,zData,x,y);
when I try to integrate such function with "integral2" I either get some warning about failing to converge, or the computation time becomes extremely large. As an example:
A = integral2(G,xmin,xmax,ymin,ymax,'RelTol',1e-10,'AbsTol',1e-10,'method', 'auto');
Warning: Reached the maximum number of function evaluations (10000). Theresult fails the global error test. > In funfun\private\integral2Calc>integral2t at 130 In funfun\private\integral2Calc at 10 In integral2 at 106
Best Answer