Torsten <
Torsten...@umsicht.fraunhofer.de> wrote in message <
0dec8726-c843-401c...@j20g2000vby.googlegroups.com>...
I meant how you came to this:
[0,pi]x[0,pi], [-pi,0]x[0,pi], [0,pi]x[-pi,0] and [-pi,0]x[-pi,0].
I implemented it as follows:
** For f+g = Odd **
temp = (quad2d(@(x,y)my_func(x,y,f,g),0,pi,0,pi,'MaxFunEvals', 1e5));
temp = temp + (quad2d(@(x,y)my_func(x,y,f,g),-pi,0,0,pi,'MaxFunEvals', 1e5));
temp = temp + (quad2d(@(x,y)my_func(x,y,f,g),0,pi,-pi,0,'MaxFunEvals', 1e5));
temp = temp + (quad2d(@(x,y)my_func(x,y,f,g),-pi,0,-pi,0,'MaxFunEvals', 1e5));
result(f,g) = temp;
I ran for f=0 and f=1 and g up to 1000 and I still get errors of the sort:
Warning: Non-finite result. The integration was unsuccessful. Singularity likely.
> In quad2d at 242
In Grid_Mesh_Hex at 102
Warning: Non-finite result. The integration was unsuccessful. Singularity likely.
> In quad2d at 242
In Grid_Mesh_Hex at 103
Warning: Non-finite result. The integration was unsuccessful. Singularity likely.
> In quad2d at 242
In Grid_Mesh_Hex at 104
Warning: Non-finite result. The integration was unsuccessful. Singularity likely.
> In quad2d at 242
In Grid_Mesh_Hex at 105