From: treecity Date: Fri, 22 Apr 2011 09:51:28 +0000 (+0000) Subject: [src] Mex und Matlab machen das gleiche X-Git-Url: https://git.leopard-lacewing.eu/?a=commitdiff_plain;h=9dfc460f7825213034351f413616137f8b299217;p=bacc.git [src] Mex und Matlab machen das gleiche git-svn-id: https://drops.fb12.tu-berlin.de/svn/bacc/trunk@14 26120e32-c555-405d-b3e1-1f783fb42516 --- diff --git a/src/G00.m b/src/G00.m index 1112d9f..b725d43 100644 --- a/src/G00.m +++ b/src/G00.m @@ -1,6 +1,6 @@ function sol = G00(p,y1,y2,x1,x2,l) - -% sol = nan; +% fprintf('%.1f | %.1f %.1f | %.1f %.1f | %.1f +',p,x1,x2,y1,y2,l); + sol = 0; if(p==-1.5) if(l==0) sol = -sqrt((y1-x1)^2+(y2-x2)^2)/((y1-x1)*(y2-x2)); @@ -10,7 +10,9 @@ function sol = G00(p,y1,y2,x1,x2,l) /(((y1-x1)^2+l^2)*((y2-x2)^2+l^2))+1); end elseif(p==-0.5) - sol = 2*p*l^2*G00(p-1,y1,y2,x1,x2,l); + if(l~=0) + sol = 2*p*l^2*G00(p-1,y1,y2,x1,x2,l); + end if((y1-x1)~=0) sol = sol + (y1-x1)*g0(p,y2,x2,sqrt((y1-x1)^2+l^2)); end diff --git a/src/build_A.cpp b/src/build_A.cpp index 3fb7295..5896472 100644 --- a/src/build_A.cpp +++ b/src/build_A.cpp @@ -133,7 +133,7 @@ for (int j=0;j